You could also place the bean in the request (request.setAttribute) but be aware that that bean will only be avaliable in a JSP that is part of the same request....
Other options are to place the bean in the servletcontext (if you want it to be accessable by all JSPs and servlets in your webapp..)
Originally posted by Shrikanth Goloposwami:
Hi guys & gals,
I am trying to access a bean which is set from a servlet in a jsp. Is this only accomplished by placing the bean in the session? If this is the case, can servlets and jsps share sessions with one another? If this isn't the case, how do servlets and jsp share objects?
then I can access this bean in bean.jsp by:
<jsp:useBean id="BeanName" scope="request" class="com.domain.BeanName">
Is this correct? I am not successful using the above scenerio.