Forums Register Login

HttpSession

+Pie Number of slices to send: Send
Is it possible to share an HtpSession b/w.
a jsp and Ejb.?
+Pie Number of slices to send: Send
No.

actually as per EJB and J2EE specs its not good design if you are sharing your session between ejb and jsp.

And when you pass session to the EJB , it will be pass by value... so any change you make in the session in EJB wll not get reflected to the JSP...

So according to me rethink on your design and find out some other way for passing session values to ejb...
+Pie Number of slices to send: Send
Hi,
First of all it is not advised to acces EJB from JSP, to perform this task we can go for the "Session Facade"- design pattern.This pattern helps us to implement the MVC-model.Here you can also maintain the HTTP session's through the session bean which may inturn access the Entity-bean.
+Pie Number of slices to send: Send
"Madhavan",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 831 times.
Similar Threads
http session object,ejb session bean
PortletSession and duplicate portlets
ICE 287 Qs
Using EJB in JSP
J2EE Object
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 02:38:21.