Hmmm...

This is all very interesting, but I still don't see
why Turbine tries to output anything else besides what
sendRedirect does itself.

Allow me to be anal for a moment...:-)
Ahem.. 

Section 6.3 of the Servlet Spec 2.3 states:

"The following convenience methods exist in the
HttpServletResponse interface:
� sendRedirect
� sendError
The sendRedirect method will set the appropriate
headers and content body to redirect the
client to a different URL. [blah, blah, blah...]
...These methods will have the side effect of
committing the response, if it had not already been
committed, and terminating it. {***}No further output
to the client should be made by the servlet after
these methods are called. If data is written to the
response after these methods are called, the data is
ignored.
If data has been written to the response buffer, but
not returned to the client (i.e. the response is not
committed), the data in the response buffer must be
cleared and replaced with the data set by these
methods. If the response is committed, these methods
must throw an
IllegalStateException."

--------------
And then we have "Java Servlet Programming 2nd
Edition"
page 143 refers to sendRedirect():

"...In addition, to support clients without redirect
capabilities or that do not recognize the
SC_MOVED_TEMPORARILY status code, the method writes a
short response body that contains a hyperlink to the
new location. Consequently, do not write your own
response body when using this method."

-----
These two resources make it very clear to me that a
"return;" would be appropriate right after the call to
sendRedirect and that Turbine should not output
anything else other than what sendRedirect() generates
on its own (other than headers you set before calling
sendRedirect() of course).

Food for thought,

-Peter




__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to