• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Save session inside a Servlet

 
Isaac DurĂ¡
Ranch Hand
Posts: 859
2
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want save in session values in my Servlet because, when I redirect to my page with




I the values are no displayed.

Could I set the values I get from processing my Servlet and display them direclty?

Any idea?

Thanks
 
R. Jain
Ranch Hand
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Angus Ferguson wrote:
the values are no displayed.

Hello Angus,
Could you explain more clearly what values are you trying to display and where??
How you are passing it?? And how till now are you storing it in session (if so)..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The session is not necessary during a forward. Request scope is a better choice.
 
Pongsakorn Semsuwan
Ranch Hand
Posts: 34
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how you set attribute to request and session. You have to set it before you forward your request to jsp.



Make sure that you understand the differences between session and request scope before choosing one.


And as R.Jain already mentioned, we need more information on what you are trying to do and how's your current situation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic