Question about sendRedirect from HttpServletResponse

"Mr. Cristian D. Romanescu" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
Hello,
I have two questions.
In documentation of HttpServletResponse, for the method sendRedirect it
says:

"Sends a temporary redirect response to the client using the specified
redirect location URL"

1. What does it means 'temporary'? Take this example:
I have a login page which if user enters correct credentials i say
sendRedirect('index.jsp') or else sendRedirect('login.jsp'). So if the
user enters correct credentials is redirected to login. What does it
means 'temporary' in this context? Is there any application state
affected if I sendRedirect?

2. Is it necessary to enter after a sendRedirect() the 'return'
statement? As in:

        if ( login )
        {
                sendRedirect('index.jsp');
                return;
        }

Because I saw it works with and without return.

Thank you very much!

Cristian.

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.