Monsieur Lapin wrote:
>
> I want to create a bean in a jsp page with scope=request
> The request is, however not sent to another jsp page but to a servlet.
>
> How can I access this bean in the servlet?
>
> I know I can work around by making scope=session, but then I have to do the
> cleanup etc.
>
> Any help would be appreciated,
The request scope corresponds to request attributes in the Servlet spec,
so use this in your servlet:
public void doGet(HttpServletRequest rqe, HttpServletResponse res) {
MyBean myBean = (MyBean) req.getAttribute("theBean);
...
}
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets