This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 +Hibernate session not get stored Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 +Hibernate session not get stored" Watch "Struts2 +Hibernate session not get stored" New topic

Struts2 +Hibernate session not get stored

Prakash Aradwad

Joined: Jan 17, 2012
Posts: 15

RECONCILATIONBEAN reconcilationBean=here some method which takes bean from database using hibernate
request.getSession().setAttribute("reconcilationBean",reconcilationBean );

in above code i have put bean in session
and in folling code

RECONCILATIONBEAN rep = (RECONCILATIONBEAN) request.getSession().getAttribute("reconcilationBean");
System.out.println("Bank Code for ........................." + rep.getBANK_CODE());

i got bank code always null
it should display perticuler bank code
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125

1. Check whether you are getting the "reconcilationBean.getBANK_CODE()" ...... value from the database during the retrieval process...

If your getting the value...


2. Check whether the session attribute has been removed in any where in the code... between these two process

Prakash Aradwad

Joined: Jan 17, 2012
Posts: 15

the second solution is useful.
subject: Struts2 +Hibernate session not get stored
It's not a secret anymore!