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 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
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
You can pass parameters to JSP pages as part of the URL, e.g. "foo.jsp?sortOrder=bar&sortDirection=baz"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

or as hidden parameters if you are submitting a form.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: passing parameters to JSP page
 
It's not a secret anymore!