Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JSP Question - encodeURL

Posted on 2001-06-08
6
Medium Priority
?
410 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:Jitu
6 Comments
 
LVL 3

Accepted Solution

by:
sghosh092199 earned 200 total points
ID: 6169198
The doc says, 'All URLs emitted by a Servlet should be run through this method'. However, if encoding is not necessary it will return the URL unchanged, though.
0
 

Expert Comment

by:smileyxx
ID: 6169258
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.
0
 

Expert Comment

by:thamaraiselvan
ID: 6170767
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.




0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:mattyk
ID: 6171100
thamaraiselvan,

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

-mattyk
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6842679
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.
http://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.

http://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.
http://www.experts-exchange.com/questions/Q.20105269.html
http://www.experts-exchange.com/questions/Q.20127552.html
http://www.experts-exchange.com/questions/Q.20132206.html
http://www.experts-exchange.com/questions/Q.20133068.html
http://www.experts-exchange.com/questions/Q.20138126.html
http://www.experts-exchange.com/questions/Q.20138127.html
http://www.experts-exchange.com/questions/Q.20138130.html
http://www.experts-exchange.com/questions/Q.20139417.html
http://www.experts-exchange.com/questions/Q.20146920.html
http://www.experts-exchange.com/questions/Q.20147065.html
http://www.experts-exchange.com/questions/Q.20160198.html
http://www.experts-exchange.com/questions/Q.20163210.html
http://www.experts-exchange.com/questions/Q.20163287.html
http://www.experts-exchange.com/questions/Q.20170731.html
http://www.experts-exchange.com/questions/Q.20184876.html
http://www.experts-exchange.com/questions/Q.20184878.html
http://www.experts-exchange.com/questions/Q.20244271.html
http://www.experts-exchange.com/questions/Q.20246429.html
http://www.experts-exchange.com/questions/Q.20254853.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20067648.html
http://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.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6897410
Force-accepted by
Netminder
CS Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question