It's OK I have made it work it was another problem which I will ask in
another topic

for those of you who want the answer it was get the HttpServlet request
object in the servlet. then use the HttpServlet.setAttribute("beanName",
beanObject); method then use the
ServletContext.getRequestDispatcher("/jsp/myJsp.jsp").forward(HttpServletReq
uest req,HttpServletResponse res); to forward to the JSP. In the JSP use the
<jsp:useBean id="beanName" .../> tag making sure the the id attribute
matches the name you give it when adding the bean to the session.

Sorry for the "sucking eggs" lesson :-)

Karl

-----Original Message-----
From: Karl Roberts [mailto:[EMAIL PROTECTED]]
Sent: 02 August 2000 18:24
To: [EMAIL PROTECTED]
Subject: request scope for bean from servlet


Hi All,

        Does any one know how to pass a bean into a JSP with a request scope
from a servlet so that the bean is not re-instanciated (because it already
exists in the request).

thanks in advance

Karl

===========================================================================
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

===========================================================================
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

Reply via email to