----- Original Message -----
From: "pedro salazar" <[EMAIL PROTECTED]>
> I think that requestDispatcher.forward() interprets a path relative to the
> servlet context and response.sendRedirect() takes URL.
As per the javadocs, sendRedirect can also take a relative path, but the
container has to convert it to an absolute URL before sending it to the
server.
> But in javadoc of
> servlet specification 2.2 says that the sendRedirect "sends a temporary
> redirect response to the client using the specified redirect location
URL".
> What means a "temporary" redirect?
It refers to the HTTP response code 307.
It is different from the moved Permanently (HTTP response code 301). For
details see RFC2616 available from http://www.rfc-editor.org/
> Is different of
> requestDispatcher.forward()? What are the differences of one way and the
> other?
requestDispatcher.forward() is used to pass the request from one servlet/jsp
to another servlet/jsp for processing (Servlet Chaining). The User-Agent is
not aware of this, and sees only one request and a response to it. This is a
totally server side concept.
In the case of sendRedirect() the server sends a response to the User-Agent
telling it that the resource requested is now available at the mentioned
URL. The User-Agent issues another request to the indicated URL. Hence this
results in two requests and two responses.
Regds,
Gokul
> --
> <psalazar/>
___________________________________________________________________________
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