tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Servlet 2.5 and RequestDispatcher.include + Response.setHeader, invalid?
Date Wed, 28 Jan 2009 15:09:40 GMT
> From: Ken Johanson [mailto:tomcat-user@kensystem.com]
> Subject: Servlet 2.5 and RequestDispatcher.include +
> Response.setHeader, invalid?
>
> It's my understanding that servlet 2.5 loosened the requirement that a
> included/callee Servlet (and JSP?) cannot set the resp headers/status,
> and should now be able to set them if not already committed.

Why do you think your "understanding" would override an explicit statement in the spec?  Here's
the exact text from SRV.8.3 of the servlet spec version 2.5mr6:

"It cannot set headers or call any method that affects the headers of the response, with the
exception of the HttpServletRequest.getSession() and HttpServletRequest.getSession(boolean)
methods. Any attempt to set the headers must be ignored, and any call to HttpServletRequest.getSession()
or HttpServletRequest.getSession(boolean) that would require adding a Cookie response header
must throw an IllegalStateException if the response has been committed."

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

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


Mime
View raw message