• Post Reply Bookmark Topic Watch Topic
  • New Topic

href loses session bean

 
Claudia Vaz
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I have a bean that is declared in the following way
<jsp:useBean id="beanBO" class="beans.beanBO" scope="session"/>
In the same page i save data to the bean.
In the same jsp page i also have a href. When i click on it i go to another jsp page but i loose the data that i saved in the bean.
What�s the problem???
Thanks
Claudia
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Claudia
What does the code on the new page look like? Are you using the same name for the Bean? I'm pretty sure when you declare a Bean the container looks for an existing Bean in the same scope with the same name. If you've used a different name you might be getting a different instance of the bean.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you've used a different name you might be getting a different instance of the bean.

or a different scope.
Additionally, the "other JSP" must be participating in the session.
regds.
- madhav
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!