This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes URL arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "URL arguments" Watch "URL arguments" New topic

URL arguments

Joshi Thomas

Joined: Oct 03, 2002
Posts: 7
I am trying to pass a URL as argument to another jsp page, unfortunately the URL (argument) also contains an argument and I cannot get the value of the URL.
eg: test.jsp?
I want the value of url to be "" but when I do a request.getparameter("url"), I am getting null for the url.
Thanks in advance.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63208

You need to encode the URL that you use as a request parameter argument so that it doesn't confuse the URL parsers.
Check out the and classes.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: URL arguments
jQuery in Action, 3rd edition