i expect the answer is thus [from j. hunter's servlet book, pg. 125]:
"...the HTTP protocol specifies that the status code and headers must
be sent before the response body."

if the include point for the servlet is after the PrintWriter has been
acquired, then you're usually toast.

robert young

> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's
> Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Stuart Maclean
> Sent: Tuesday, August 15, 2000 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: JSP 1.1/Servlet 2.2 spec comments
>
>
> Hi all, I sent this to Sun, thought it might be of interest
> to the community...
>
> I am using Tomcat 3.1 for a server side project.  I have a problem in
> that I want to set headers, cookies specifically, from within an
> included servlet, using the <jsp:include page=/myServlet> mechanism.
>
> I see from the JSP 1.1 and Servlet 2.2 specs that this practice is
> prohibited, and attempts to use it are ignored.  Thus Tomcat is
> adhering to the specs in this case.  My question is "why is header
> manipulation within included servlets/JSP forbidden.  Neither spec
> gives any insight to the reasons for this behaviour.
>
>
> Stuart Maclean
> --
> Stuart Maclean, Research Associate
> University of Washington
> ITS Research Program, College of Engineering
> Box 352500
> Seattle, WA 98195-2500
> Tel: (206) 543-0637
> http://www.its.washington.edu
>
> ______________________________________________________________
> _____________
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to