You want to call the request dispatcher from your servlet when it's done
setting things up. To forward the request to the JSP, something like this
should do the trick:

RequestDispatcher rd = getServletContext().getRequestDispatcher(path);
rd.forward(request, response);

Hope this helps.

--
Martin Cooper
Tumbleweed Communications


----- Original Message -----
From: "Jennifer Feeney" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 3:54 PM
Subject: JSP-Servlet question...


> Hi,
>
> Thank you in advance to anyone who maybe able to help me with this
> query.
>
> I am completely new to JSP, however I have been working on Servlets
> for quite awhile...Here is my query.
>
> DESCRIPTION:
> ===================================================================
> I presently have servlets which take input from a client(browser),
> accesses a database and retrieves information from it to display the
> output to the user, presently, I am dispaying the output to the user
> in HTML format.
>
> This HTML is written in the servlet code, however, I have learned
> that I can take the HTML away from the Servlet and instead, "feed"
> the output from the servlet to a JSP file, which conatins all the
> HTML for presentation and will also accept the info passed to it by
> the servlet and include it in the HTML, for display purposes.
>
> Basically, how do I develop a situation where a servlet is invoked by
> a user, but the servlet sends the answer to a JSP file for
> presentaion to the client.
>
> Any help would be really helped.
>
> Best Regards,
> Jennifer
>
> _____________________________________
>
> Get your free E-mail at http://www.ireland.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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