简体   繁体   中英

get request parameters in struts-config.xml in struts1

In my action I would like to redirect to completely new application, I have configured my action as below in struts-config.xml

 <action path="/nameSpace/Myaction" type="MyActionClass" name="MyForm">
   <forward name="success" path="hereIwanttosendDynamic" redirect="true" />

 </action>

as you can see in above configuration I want to redirect to new application, And that application URL will be defined in my Action Class.

Now my doubt is Can I use EL in Struts-config.xml so that I can keep my new application URL in request and I would like to get that in struts-config.xml Something like below

path="${redirectURL}"

No, you can't.

The S1 config file is read at startup and does not store expressions that can be evaluated later.

But there's no reason to; redirect from the action.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM