This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Java access parameter pass by URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Java access parameter pass by URL" Watch "Java access parameter pass by URL" New topic
Author

Java access parameter pass by URL

Hoe Chin
Greenhorn

Joined: Jul 01, 2009
Posts: 23
I have a faces page. let said now the link http://localhost:8080/Page.faces?ID=asdasd1237123

When user click on this link i need to get the id value to do some checking how can i get the id value?

if i use this String url=request.getRequestURL().toString(); the url return me http://localhost:8080/Page.faces only
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
try request.getParameter(String)

request.getQueryString will give you the part after "?"


Experience and talent are independent of age
Hoe Chin
Greenhorn

Joined: Jul 01, 2009
Posts: 23
Thank you for replied i got it works
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java access parameter pass by URL
 
Similar Threads
How to retrieve value from a link
Newbie: Cant hit URL http://localhost:8082
Obtain Get Parameters using HttpServletRequest
howto read a parameter from the URL (AS IS)
ActionForward to external application