dcsimg
Jsp - Servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   elango_maragtham
Posted On:   Wednesday, March 21, 2001 07:25 PM

I have Stored Login Informnation of user as a user object and put that in session using request.setAttribute() and in the jsp pages and servlets i fetch using request.getAttribute() and call the methods in user object to get the datials .. But sometimes it is giving classCastException .. I cant figureout the problem.. I have included all the required packages and classes. i have used HttpSession object for this .. i have triend with HttpSession.getValue(),HttpSession.putValue() ... there also i get the same error sometimes .. I am using weblogic 6.0 servlet 2.2 Can someone explain why? it happens... reply to elango.maragatham@db.com    More>>
			
I have Stored Login Informnation of user as a user object and put that in session using request.setAttribute()
and in the jsp pages and servlets i fetch using request.getAttribute() and call the methods in user object to get the datials ..
But sometimes it is giving classCastException ..
I cant figureout the problem..
I have included all the required packages and classes.
i have used HttpSession object for this ..
i have triend with HttpSession.getValue(),HttpSession.putValue() ...
there also i get the same error sometimes ..
I am using weblogic 6.0 servlet 2.2
Can someone explain why? it happens...

reply to elango.maragatham@db.com    <<Less

Re: Jsp - Servlet

Posted By:   Natarajan_CHOCKALINGAM  
Posted On:   Wednesday, March 21, 2001 08:00 PM

hi
Please cast it while using request.getAttribute(). eg. if you have used request.setAttribute() and put a string object you should cast it to String while using request.getAttribute(). The same holds good for HttpSession.getValue().
thanks
natarajan
About | Sitemap | Contact