Cheers Bill.
K
Bill Barker wrote:
Using response.sendRedirect() sends a very small message back to the client,
who then issues another Request on the same open Socket for the new URL.
Unless you have a lot of network latency (e.g. a dial-up connection), this
will be very fast. It's likely that beating the rd.forward() will depend a
lot on if you are using the new Http11-APR connector or not.
The main difference between using rd.forward() and request.sendRedirect() is
the path that the browser thinks that it is seeing. For example, if your
Servlet does:
RequestDispacher rd = request.getRequestDispatcher("subdir/mypage.html");
rd.forward(request, response);
and 'subdir/mypage.html' has an <img src="supercool.gif" /> tag, than the
browser will attempt to load 'supercool.gif' from the directory of the
original Request, and not for the 'subdir' directory.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]