Can I use object in JSP which is created in servlet?
Joined: Dec 03, 2005
How should I access object, which I have created in servlet?
Servlet handles the requests(controller) and forwards to requested jsp page. Some of the jsp pages need EJB objects. When i create an ejb object in servlet and then forward the request to jsp, how can i access the object in jsp ?
This should be MVC - based application, like JSP-Servlet-EJB.
Thanks! [ December 07, 2005: Message edited by: Dave Thunder ]
Author and all-around good cowpoke
Joined: Mar 22, 2000
You can attach any reference to the request - see the JavaDocs for javax.servlet.ServletRequest - specifically setAttribute and getAttribute. Bill