I would like to know if there is a way to pass a variable to the path properties of the <forward /> tag for a specific action within the Struts-Config.xml.
From my Action class and map in struts-config with something like this: <action path"/tasknotify" scope="request" type="sync.server.contact.AgentNotify" name="AgentNotifyForm" input="/agentapp/dummy.jsp" validate="false"> <forward name="DynamicForward" path= "Variable containing dynamic path"> </forward> </action> Has anyone come across a solution for this issue (<forward name="DynamicForward" path= "Variable containing dynamic path" </forward> ? Thanks in Advance Raj Chacko
There is no way u can make ur path variable dynamic as once the config file is loaded it will be freezed mean to say that u cant set the path ..................but the same thing can be achieved( i mean to say the path will be fixed an just u need to pass different variables with diff values) before forwading them set them in request scope and u will be able to access them in ur resource ....................
i hope u got what i am saying u cant get back if u have any issues in this
I had the same issue and couldnt find the answer but what I did was in Action.java you can use response.sendRedirect("http://google.com/"+yourVariable) instead of using a variable in path of struts-config.xml