Ok! Thanks! You have all the reason. I don't need to put the ActionForward in the config, only return it. Now I have another problem:
I use a non relative URI: http://localhost:8081/ultimasNoticias.do But my browser tries to go to: http://localhost:8081/http:/localhost:8081/ultimasNoticias.do I tried both forms (my Action is http://localhost:8081/login.do) return new ActionForward("dirTo","http://localhost:8081/ultimasNoticias.do",true,false) ; and return new ActionForward("dirTo","http://localhost:8081/ultimasNoticias.do",true,true); both with the same result. What's the correct? What's the mistake? Thanks!! -----Mensaje original----- De: Christopher Seekamp [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 05 de septiembre de 2002 15:42 Para: Struts Users Mailing List Asunto: RE: Exception when addForwardConfig Miguel: Well, I don't fully understand what you are trying to do. You are trying to add another forward to one of your mappings, which is frozen. Usually it would seem within an Action you would return an ActionForward indicating where to go next, such as new ActionForward( "http://someurl.com ",true). I guess you are trying to update your configuration dynamically to allow later executions of one or more of your Actions to look up this new forward by name? I was not aware that the frozen configuration was new to Struts 1.1 but I guess it is. For a little more information on the frozen configuration issue perhaps see http://www.mail-archive.com/struts-user@jakarta.apache.org/msg30718.html Chris Seekamp |---------+-------------------------------------> | | Miguel Angel Mulero | | | Martinez | | | <[EMAIL PROTECTED]| | | ecsidel.es> | | | | | | 09/05/2002 08:58 AM | | | Please respond to "Struts | | | Users Mailing List" | | | | |---------+-------------------------------------> >--------------------------------------------------------------------------- ------------------------------------------------------------------| | | | To: Struts Users Mailing List <[EMAIL PROTECTED]> | | cc: | | Subject: RE: Exception when addForwardConfig | | | | | >--------------------------------------------------------------------------- ------------------------------------------------------------------| Hi Chris, In Struts 1.0.2, I used the ActionMapping.addForward() to create a new forward and it worked. In Struts 1.1b2 this function doesn't exist, and I thinked that addForwardConfig() was the substitute. What function must I use to create a forward dinamically? I don't want to write it to the configuration of my application, only want to use it to make a findForward(). Thanks!!! -----Mensaje original----- De: Christopher Seekamp [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 05 de septiembre de 2002 14:49 Para: Struts Users Mailing List Asunto: RE: Exception when addForwardConfig Miguel: Most configuration objects can only be created when the struts-config.xml is being created. I assume that this is due to the fact that in many cases (for example Action objects) are single instances used in multiple threads so that they must be frozen (no updates allowed) after initialization so that there are no multi-threaded issues. The ActionMapping, via the ActionConfig from which it inherits, is one of those configuration objects that gets frozen. So basically, after the struts-config.xml is read and processed at initialization time, such objects cannot be updated. Chris Seekamp |---------+-------------------------------------> | | Miguel Angel Mulero | | | Martinez | | | <[EMAIL PROTECTED]| | | ecsidel.es> | | | | | | 09/05/2002 08:00 AM | | | Please respond to "Struts | | | Users Mailing List" | | | | |---------+-------------------------------------> >--------------------------------------------------------------------------- ------------------------------------------------------------------| | | | To: Struts Users Mailing List <[EMAIL PROTECTED]> | | cc: | | Subject: RE: Exception when addForwardConfig | | | | | >--------------------------------------------------------------------------- ------------------------------------------------------------------| More data to my previous message: In the javadoc, I've found that findForward: Throws: java.lang.IllegalStateException - if this module configuration has been frozen I don't know what that means. Someone could tell me how to "unfroze" the module? Thanks!! -----Mensaje original----- De: Miguel Angel Mulero Martinez [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 05 de septiembre de 2002 13:25 Para: Lista de correo Struts Asunto: Exception when addForwardConfig I have an Action that creates a dinamic forward (Struts 1.1b2). I use: mapping.addForwardConfig(new ForwardConfig("dirTo","http://someurl.com",true)); but when my Action executes this line I have the exception: javax.servlet.ServletException: Configuration is frozen before I can made: return mapping.findForward("dirTo"); ¿Someone can help me? Thanks in advance!! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>