Currently (i.e. Struts 1.2.x) this is done in the processForwardConfig()
method of the RequestProcessor - if the ActionMapping has "redirect" set to
true it calls the sendRedirect(url) method - which as I understand it is a
convenience method for setting a "302" status and "location" header.

Currently you would have to create your own custom RequestProcessor to
achieve this and override the processForwardConfig() method to do this.

Not sure about "isPermanent" - looks like there are a number of
"redirection" status codes according to the spec - 301/302/303/307

ftp://ftp.isi.edu/in-notes/rfc2616.txt


Niall

----- Original Message ----- 
From: "Dakota Jack" <[EMAIL PROTECTED]>
Sent: Saturday, January 07, 2006 3:06 PM


Hi, Eric,

I think you have to go back through the code and find out where the status
codes are handled.  I have to admit that I don't know.  If someone else
does, this would be great information to have.  This is an interesting
problem and one that I always put on the back burner.  Maybe now is the time
to make some decisions about what to do.



On 1/7/06, Eric Jain <[EMAIL PROTECTED]> wrote:
>
> Mark Lowe wrote:
> > Not sure if i've understood what you're after, but you can just write
> > to the reponse (as you would in a normal servlet) and return null for
> > you action forward. Your webapp configuration will do the rest from
> > there like with any webapp.
>
> Yes, that's a solution. On the other hand ActionForwards are convenient to
> use (no need to worry about paths etc.), so I was wondering if you could
> do
> something like:
>
>    forward.setRedirect(true); // existing method
>    forward.setPermanent(true); // possible extension?
>
> I know it is possible to implement your own ActionForward classes, but I'm
> not sure that would help here. Ideally the RequestProcessor would ask the
> ActionForward for a status code at one point...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to