struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: Question about ActionForward.setRedirect method
Date Mon, 24 Oct 2005 14:48:23 GMT
I have to make some educated guesses here, because I don't know the full
Struts lineage at that early stage (didn't start using it until 1.1)...

The message your seeing is because the forward configs are frozen once
they are read in.  Recall that, like Actions, there is one instance for
any given forward config and this is shared by all requests.  If you could
alter them in one request, you could adversely affect another.

My *guess* is that the configuration freezing was added after 1.0.2.  I
don't know that for sure though.  In any case, it is certainly the case in

The way to deal with this is to return an ActionRedirect from your Action
instead.  One of the constructors for that class takes in a ForwardConfig,
so what you can do is:

ForwardConfig f = new ActionRedirect(mapping.findForward("whatever"));
return f;

Alternatively, you could just have new mappings in struts-config that are
defined as redirects, so you could just remove that setRedirect() call

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM: fzammetti
Yahoo: fzammetti

On Mon, October 24, 2005 9:41 am, said:
> Hello,
> I'm converting my struts apps from version 1.0.2 to 1.2.7.
> In my 1.0.2 app I can call ActionForward.setRedirect method and pass it
> "true" with no problem. When running with 1.2.7 it generates the following
> error.
>    Error [javax.servlet.ServletException: Configuration is frozen], with
>    root cause [java.lang.IllegalStateException: Configuration is frozen].
> Can someone please explain why?
> Thanks!
> David
> -----------------------------------------
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this document in error and that any
> review, dissemination, distribution, or copying of this message is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately, and delete the original message.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message