• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Servlet basics

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to encode the URL.

resopose.encodeURL() does URL rewriting , but how can we do the URL encoding.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try java.net.URLEncoder.encode()
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response.

yeah java.net.URLEncoder.encode() does encoding correct.
In JSTL we have very good mecanism for encoding url
Example

<c:url value=�/inputComments.jsp� var=�inputURL� >
<c aram name=�firstName� value=�${first}� />
<c aram name=�lastName� value=�${last}� />
</c:url>


Same way don't we have any method in servlet api which does this purpose?
[ August 01, 2008: Message edited by: Chintu sirivennela ]
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic