Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP help with URL parameters  RSS feed

 
Mario Ciliotta
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am in the process of converting a very simple Cold Fusion page over to JSP. I figured out how to do the query and get the output to display to the screen but in the CF page -- I use a function call #urlencodedformat(Logo_Catalog_Items.Item_Name)#. This function takes a string and makes it URL safe. What I do is pass the data thru the URL to a FLASH movie so I need to make sure the data is URL safe.

Is there a JSP version of this function?

Thanks
Mario
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think it is something like this:

url = response.encodeURL(url);
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out java.net.URLEncoder.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!