Caldarale, Charles R wrote:
From: Ken Johanson [mailto:tomcat-u...@kensystem.com]
Subject: Re: Servlet 2.5 and RequestDispatcher.include +
Response.setHeader, invalid?
Do you know if that rule applies only to the Request
object passed by the RequestDispatcher, or should the
container also prevent this if the original Request
was purposely passed into the dispatched handler, in
order to allow it to set headers/status?
Good question; sounds like yet another ambiguity in the spec. I'd have to dig
through the code to find out how Tomcat currently handles that situation, and
that's not likely to happen today. Hopefully one of the committers can answer
that.
- Chuck
Before someone decides to commit code that "fixes" this, I would submit
that the behavior should remain as-is; because if the calling servlet is
purposefully conveying the original request object to a dispatched
handler, then the callee should be allowed to set them. There are no
doubt others who rely on this behavior right now, since there are some
cases in where forward() or filters are not suitable. I too am looking
for predictability / stability...
-k
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org