----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


There's been a whole lot of discussion regarding sendRedirect() on the
list lately, convering the gambit between JSSI, to usage. I figure I'd
throw one more question into the mix. My apologies if this has been
covered recently, I tried digging for awhile and couldn't find anything
that directly addressed my issue.

According to O'Reilly's servlet book, you've got to do a sendRedirect()
before your servlet sends any output. Is this actually the case with
JServ? If it isn't, and sendRedirect can be used anywhere in the
service() or other request/ response handling methods, is that
considered a 'feature' or something that I can rely on being consistent
in future releases?

I wonder this, because I'm trying to use sendRedirect() in conjunction
with GnuJSP. Say I do a sendRedirect() prior to the first html tag in a
jsp. Once the jsp gets transformed into java source I can see that the
sendRedirect() will get sent prior to sending anything through
out.println(). This is a good thing, because this seems to indicate
that as long as a sendRedirect() is performed prior to any non JSP tag
it will work, because it's happening before any output is sent by the
servlet.

I have to admit that I haven't tried putting a sendRedirect() in the
heart of a JSP page to determine if sendRedirect() still works after 
output has been sent. If I had, and it would have worked, I still would
have no idea if such a thing was a 'feature' or intended to work that
way.

Does anyone have any comments? ideas?

Thanks,

Drew Farris



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to