File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes passing parameters to JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "passing parameters to JSP page" Watch "passing parameters to JSP page" New topic
Author

passing parameters to JSP page

gino jersey
Greenhorn

Joined: May 24, 2005
Posts: 21
i have a jsp page (call it foo.jsp) which processes data from a form. in the form the user enters search criteria, and the jsp runs the query and displays the data.

i use request.getParameter in foo.jsp. ok
in foo.jsp, there are hyperlinks that link back to foo.jsp to run the query again but sort it differently.

how can I pass the session parameters back into foo.jsp so they are available in the "second call" of foo.jsp?

thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41601
    
  55
You can pass parameters to JSP pages as part of the URL, e.g. "foo.jsp?sortOrder=bar&sortDirection=baz"


Ping & DNS - my free Android networking tools app
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

or as hidden parameters if you are submitting a form.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing parameters to JSP page