File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes jsp/servlet/beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp/servlet/beans" Watch "jsp/servlet/beans" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
sorry, my question is going to be a little confusing
i have jsp, servlets, beans, and some other classes(session ejb
but never mind). firstly, servlet creates a bean_1 then the bean_1 creates an ejb(obj1), the bean_1 is used by .jsp. then the servlet creates a bean_2 and what i need is to have the same ejb object(obj1) in the bean_2 as i had in the bean_1. i'm going to send HttpSession or HttpRequest from servlet to constructors for the both beans, so that i could use session.setAttribute("obj1", obj1) in the bean_1 and session.getAttribute("obj1") in the bean_2. but it seems to me not really nice to put HttpRequest objects in beans. if somebody can understand what i mean here
and suggest some solution i would be just happy
I agree. Here's the link:
subject: jsp/servlet/beans
It's not a secret anymore!