This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL rewrite and URL encoding.  RSS feed

 
rajesh sridhara
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jsp,<c:url> tag just only do the url rewrite but not url encoding.I would like to know that,whether url encoding is the job of browser or the server?

how does the url encoding when the server receives first request from the client?
 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you don't need to encode URLs, it is browser's job.
 
rajesh sridhara
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it is so,we are using <c aram> tag as the body of <C:url>to perform url encoding.<C:url> cann't do url encoding it just do url rewrite.

Because of this i was confused a bit.Please post a comment...
 
rajesh sridhara
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:param> tag in the above comment..
 
Maurizio Nagni
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The c:url tag CAN do url rewriting and encoding. All is more clear if you consider the string address+parameters as THE URL (if one of your parameter is "Fred Flinston" obviously the server will encode it as it should be "Fred+Flinston").

For a clean and straight example look at

http://www.sitepoint.com/article/java-standard-tag-library/3

or

http://www.onjava.com/pub/a/pub/a/onjava/2002/05/08/jstl.html?page=2
 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry... I was wrong. Thank you Maurizio.
[ February 18, 2008: Message edited by: Srikanth Reddy Lankireddy ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!