IntelliJ Java IDE
The moose likes Struts and the fly likes Struts2 +Hibernate session not get stored Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Struts2 +Hibernate session not get stored" Watch "Struts2 +Hibernate session not get stored" New topic
Author

Struts2 +Hibernate session not get stored

Prakash Aradwad
Greenhorn

Joined: Jan 17, 2012
Posts: 13

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: 123



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

If your getting the value...

then...

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

Prakash Aradwad
Greenhorn

Joined: Jan 17, 2012
Posts: 13
thanks

the second solution is useful.
 
 
subject: Struts2 +Hibernate session not get stored
 
Threads others viewed
Accessing session or application attributes from within a JavaBean
Doubt on session() and session(false)
When Session Closed Data Will be Lost in Hibernate
jsf bean instance in servlet
Integration of session bean with hibernate POJO
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture