Han Chock Lee wrote:
> Hi all,
>
> I have created a HttpSession and use session.isNew() method to check whether
> the user has joined in the session, I notice that in the first hit of
> accepting the session, it doesn't redirect to the designated page
> (Welcome.html), it redirects only after the second attempts.
>
> Any help is appreciated.
>
> Here is the code:
>
> HttpSession session = req.getSession(true);
>
> if ( !session.isNew()){
>
This statement says, in effect, if the session is *not* new then go to
"Welcome.html". Is that really what you wanted?
>
> response.sendRedirect("Welcome.html");
>
> }
>
> else {
> response.sendRedirect("index.html");
> }
>
> Regards,
> Han
>
Craig McClanahan
___________________________________________________________________________
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