JSP gives you a default "well known" variable named out.  @include
includes the code of the Servlet into the jsp.  If you try to declare another
variable named  out you will have compile time errors.  Just use the well
known out variable in the included code (ie, don't declare it).
Hope this helps.

Kamal Anand wrote:

> Hi All:
> Does anyone know how to migrate the following tag jsp 0.91 code to JSP 1.0?
>
> <servlet name="/servlet/MyServlet" code="/servlet/MyServlet"></servlet>
>
> I tried replacing the above with
> <jsp:include page="/servlet/MyServlet" flush="true" />
>
> but it gives an exception on the call to printwriter.
>
> The above code basically includes the output from MyServlet into the current
> jsp file.
> The limitations being the servlet cannot set headers etc.
>
> The code for MyServlet looks like
>
> doGet or doPost
> {
>    PrintWriter out = res.getWriter();
>    out.print("something");
> }
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

--
Tom

Thomas Preston
Vacation.com, Inc.
Engineering Department
617.210.4855 x 124

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to