aspose file tools*
The moose likes Struts and the fly likes session problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "session problem" Watch "session problem" New topic
Author

session problem

sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
IN my struts applicaton i have a series of 5 pages

i am setting one attribute to session on 2 page and retrieving it on 3,but when i navigate to 4 page and get back to 3 ,its showing error like the element is not found in the session..
but it works well from 2 to 3...
any help pls
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Once you put something in the session it stays there unless one of the following occurs:

1-The session times out
2-The session is invalidated with session.invalidate()
3-The attribute is removed with session.removeAttribute("myBean")

You might want to check whether there are name conflicts. One action may be inadvertently setting or clearing a session attribute using the same name as the one you're having problems with.


Merrill
Consultant, Sima Solutions
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Since you're using Struts,
I'm going to move this thread to our Struts forum.

There may be things specific to that framework that need to be considered.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
thank you....for ur quick reply
its working now..its a name conflict..occured over the pages..
 
wood burning stoves
 
subject: session problem