This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieving parameters from jsp

 
Chandra shekar M
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Here is the scenario. JSP will send the request along with request parameters using httppost. the servlet will process the request and forward the request to another
JSP File.

To access the request parameters of first JSP in second JSP. I can put them as request attributes in the servlet and forward the request to second jsp.
now my question is, is there any way where we can directly access the request parameters of first JSP In the Second JSP with the above scenarion. where the request
is forwarded to second jsp by the servlet.

If we are using httpget. then we can do this by calling javax.servlet.http.forward.query_string attribute. But here i have a httppost so i need some thing like
javax.servlet.http.forward.parameter.

Is there any other way to get this done.

Thanks
Raja
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Because you forward the same request from the servlet to the JSP, all request information, including parameters are available.

Use the param EL built-in map to access the parameter values.
 
Chandra shekar M
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thanks for the reply, here there was one mistake in the post. the servlet will send a new http request to another servlet present on other server which will intern forward the new request to the second JSP. i think in this case we cant fetch the parameters directly.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, of course not. That changes everything. You'll need to pass the values on the URL of the remote request.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic