Title: RE: why does struts use forward instead of redirect
you can ActionForward class to pass in your path and a boolean value for redirect to tell the class to perform a RequestDistcher.forward() or HttpServletResponse.sendRedirect(). The default is forward so set the redirect flag to True
Both are available in most cases. Forward is most often used since we
usually we want to send the current request along, rather than create a
new one (which is what redirect does).
> Jonathan Asbell wrote:
>
> Anyone know why struts uses forward instead of redirect?
In your code you can, I don't think there is a run-time parameter between them
because it would affect code quite drastically if you switched from forwards
to redirects.
At 08:40 AM 25/04/01 +0100, you wrote:
>Can you switch between the two, i.e. make struts use redirect?
>>At 11:13 PM 24/04/01
Can you switch between the two, i.e. make struts use redirect?
-Original Message-
From: Jim Richards [mailto:[EMAIL PROTECTED]]
Sent: 25 April 2001 04:09
To: [EMAIL PROTECTED]
Subject: Re: why does struts use forward instead of redirect
>At 11:13 PM 24/04/01 -0400, you wrote:
>
>At 11:13 PM 24/04/01 -0400, you wrote:
>Anyone know why struts uses forward instead of redirect?
A redirect sends a request back to the browser, thus generating another
connection between the client and server. Forward keeps it internal
to the server, which also means you can re-use the reques
Anyone know why struts uses forward instead of
redirect?
6 matches
Mail list logo