• Post Reply Bookmark Topic Watch Topic
  • New Topic

doubt in session  RSS feed

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a program with following flow
servlet(A)-->jsp(B)-->jsp(c)

I am going from jsp B to jsp C by clicking on a button and submitting the form...
If in c,i am trying to take some value by doing :

which i have set in A,by doing :


It is not giving the value,i think it is because session object in servlet has been taken through request.getSession,so,as soon as request will change any values set in that servlet through session are gone and can't be accessed.Please tell if i am wrong somewhere...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The request will not change or remove any session scoped variables. The problem must lie elsewhere.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
I have already told whatever is happening on my side.Can you please check if this is also happening on your side.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the hundreds of web applications I have written, a scoped variable placed in the session stays put until explicitly removed or the session expires.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!