Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

servlet encodeURL method

Hi,

I read as

servlet encodeURL method server-side forwards and includes. I wonder why we do not need in these cases.
please advise
Any links resources ideas highly appreciated. Thanks in advance
Avatar of rrz
rrz
Flag of United States of America image

Your  question is  not clear.  But I'll try to help you anyway.  
The encodeURL method is used to add session id to a url if a session cookie is not used by client.  It is used to prepare the response to be sent to the client.
>forwards and includes      
These are server side actions. The server already knows the session id. So, there no need for encoding the url during these actions.
Avatar of gudii9

ASKER

These are server side actions. The server already knows the session id. So, there no need for encoding the url during these actions.

But for the very first time user interacts with the server  then server does not know if cookies are used or session id is being used right? Even that case also servlet encodeURL method not needed for server-side forwards and includes? please advice
ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial