Link to home
Start Free TrialLog in
Avatar of Jitu
Jitu

asked on

JSP Question - encodeURL

Hi

From what i understand encodeURL can be used to put session information in the URL, if cookies are disabled.

I am developing a website with JSP pages, where User is not supposed to login. It is a content website, which anyone can come and browse, and i dont care for tracking sessions of users.

Should i use response.encodeURL in this case ???

Since, i dont bother about sessions, why should i use encodeURL at all ?

Pls throw some light on this.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of sghosh092199
sghosh092199

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
Avatar of smileyxx
smileyxx

You are correct, you do not need to use it unless you want to use the functionality of sessions through url rewriting -- that is the only purpose of encodeURL.
hi ,
There is another use of encoding URL.

 Suppose you have two JSPs.

1.One with name as "Hello  World.jsp" .(Two space between "Hello" and "World").

2.Other is "Login.jsp" (this contain link to above jsp).

If u click the "Hello  World.jsp" link in  "Login.jsp" Netscape throws 404 error, Incase you are not encoeded that URL.(Because of blank space).

If that URL is encoded Netscape automatically replace blank space with "%20" and Correctly display the page.




thamaraiselvan,

  I believe the functionality you are describing is actually done with the java.net.URLEncoder object and not response.encodeURL.

-mattyk
Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, in the event new items have been created since this listing was pulled.

https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20105269.html
https://www.experts-exchange.com/questions/Q.20127552.html
https://www.experts-exchange.com/questions/Q.20132206.html
https://www.experts-exchange.com/questions/Q.20133068.html
https://www.experts-exchange.com/questions/Q.20138126.html
https://www.experts-exchange.com/questions/Q.20138127.html
https://www.experts-exchange.com/questions/Q.20138130.html
https://www.experts-exchange.com/questions/Q.20139417.html
https://www.experts-exchange.com/questions/Q.20146920.html
https://www.experts-exchange.com/questions/Q.20147065.html
https://www.experts-exchange.com/questions/Q.20160198.html
https://www.experts-exchange.com/questions/Q.20163210.html
https://www.experts-exchange.com/questions/Q.20163287.html
https://www.experts-exchange.com/questions/Q.20170731.html
https://www.experts-exchange.com/questions/Q.20184876.html
https://www.experts-exchange.com/questions/Q.20184878.html
https://www.experts-exchange.com/questions/Q.20244271.html
https://www.experts-exchange.com/questions/Q.20246429.html
https://www.experts-exchange.com/questions/Q.20254853.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
https://www.experts-exchange.com/questions/Q.20067648.html
https://www.experts-exchange.com/questions/Q.20146897.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
Force-accepted by
Netminder
CS Moderator