• Post Reply Bookmark Topic Watch Topic
  • New Topic

Any means for passing request attributes through redirection?

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i wanted to know is there any way of passing request attributes to other pages using page redirection instead of page forwarding.

Example

The method i am suggested is introduce a servlet (sayC) to which servletA forwards the attributes which in return forwards it to PAgeB ??
Is this mechanism correct
Example
ServletA(forwards)->ServletC(forwards)->PageB
 
Pete Nelson
Ranch Hand
Posts: 147
Debian Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A "redirect" is part of the HTTP protocol, and takes place at the browser, not the server.

Request attributes exist only on the server, and are never sent via HTTP.

So, since they happen in two different environments, the short answer is "no".
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the session scope instead of that of the request. Or you could write the values into hidden inputs to be submitted on the next request. But no, you can't just use request scope.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!