tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Hanna <Phil.Ha...@sas.com>
Subject RE: servlet include
Date Thu, 03 Aug 2000 20:18:47 GMT
out.println in your servlet is writing back to the servlet output stream, which is just going
back to the web browser.  There is no server-side JSP interpretation going on.  You don't
see it on the web page because the browser just ignores anything it can't render.  Do a view
source on the browser, and you'll see your <jsp:include> tags.

What you meant to do is request.getRequestDispatcher("Buttons.jsp").include(request, response),
which will include the JSP and merge its output with the generated HTML being sent back to
the web browser.

-----Original Message-----
From: Sebastien Payette [mailto:Spayette@interstarinc.com]
Sent: Thursday, August 03, 2000 3:21 PM
To: tomcat-dev@jakarta.apache.org
Subject: servlet include



Good afternoon to all, here is my problem

I am trying to include (the output of) a jsp page into (the output of) a
servlet, without much success.

My best bet was to use this little piece of code, inside my servlet:

out.println("<jsp:include page=\"Buttons.jsp\" flush=\"true\">");
    out.println("<jsp:param name=\"TotalPage\" value=\"TotalPage\"/>");
    out.println("<jsp:param name=\"TheFolder\" value=\"TheFolder\"/>");

out.println("</jsp:include>"); 

This looks very right to me yet still, (the output of!) my servlet skips
whatever should be
coming from the jsp page with the  <jsp:include...blablabla...>  command.
Is it something I am doing wrong? I have looked in jGuru, but my problem is
unsolved.
Any Ideas, suggestions?
Thanks Sebastien Payette   

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

Mime
View raw message