aspose file tools*
The moose likes JSP and the fly likes Grabbing the path and arguements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Grabbing the path and arguements" Watch "Grabbing the path and arguements" New topic
Author

Grabbing the path and arguements

Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
How would I grab the path and arguments?
for example, if a user clicked on a link that sent him to a page like this:
http://localhost:8080/ssi/fc?obj=rfp&cmd=myRFP&nextPage=RFP_MyRfp.jsp
how would I dynamicaly grab the information and append another argument on it?
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
request.getParameter(paramName);


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
I need all of them, and the exact path that was entered to get to the page
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Check also these methods in the API

request.getPathTranslated();
request.getPathInfo();
request.getParameterNames();
request.getParameterMap();
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
Thank you!
ramakrish nan
Greenhorn

Joined: Aug 23, 2005
Posts: 7
Originally posted by Daniel Prene:
How would I grab the path and arguments?
for example, if a user clicked on a link that sent him to a page like this:
http://localhost:8080/ssi/fc?obj=rfp&cmd=myRFP&nextPage=RFP_MyRfp.jsp
how would I dynamicaly grab the information and append another argument on it?


answer

request.getQueryString();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grabbing the path and arguements