Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request.setAttribute() in servlet  RSS feed

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i set request.setAttribute() in servlet and then do sendRedirect ..can i use request.getAttribute() ??

currently the value is not beign reflected when I do request.getAttribute()

thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope.

A redirect causes the browser to initiate a new request.
 
Rao Raghu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to append the parameters to the URL or use hidden forms.




 
Milan Jagatiya
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Nope.

A redirect causes the browser to initiate a new request.


yeah...thats true...

use RequestDispacher to forward your request...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!