Guilherme Birckan wrote:
> Thanks, but the problem isn't that simple, it really doesn't work
> as I want it to. Have you guys ever tried to do something like this? I
> forgot to mention, I'm using Apache 1.3.9, Apache JServ 1.0, Apache JSSI
> 1.1.2 and the jsdk.jar file from the JSDK2.0, 'cause the docs of the JServ
> or the JSSI (I don't remember which one) mentioned I couldn't use the
> JSDK2.1 ... I really need this as fast as anyone can tell me what to do,
> thank you so much for any help...
> Best regards,
>
I'm afraid you are not going to be able to issue a redirect from inside the
servlet called by a SERVLET tag. The reason for this is that the HTTP headers
for the response have already been created (by the JSSI servlet that is
processing the page), so any change you make to the headers from inside the
called servlet will have no effect. You will have to use some other mechanism to
control redirction when it is needed, or else create a customized version of the
JSSI servlet, based on the existing source, that does your session existence
check as the very first thing in its doGet() method.
I doubt it will make you feel any better, but the same restriction applies to
servlets or JSP pages that are included with RequestDispatcher.include() or
<jsp:include> in the current specifications.
> Guilherme Birckan
>
Craig McClanahan
>
> On Mon, 20 Sep 1999, jon * wrote:
>
> > > I am executing a .jhtml page which has a reference <SERVLET ...>
> > > to a servlet. In the doGet() method of that servlet, I test if the
> > > HttpSession is null, and, if it is, I redirect the user by using the
> > > response.sendRedirect() method. The problem is that the page is NOT being
> > > redirected, instead of that, the rest of the HTML page is being show, what
> > > i didn't want to happen. What can I do?
> >
> > After the sendRedirect(), put a return;
> >
> > -jon
> >
> > ___________________________________________________________________________
> > 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
___________________________________________________________________________
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