简体   繁体   English

在struts1的struts-config.xml中获取请求参数

[英]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 在我的操作中,我想重定向到全新的应用程序,我在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. 如您在上面的配置中看到的,我想重定向到新的应用程序,并且该应用程序URL将在我的操作类中定义。

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 现在我的疑问是我可以在Struts-config.xml使用EL以便我可以在request保留新的应用程序URL,而我想在struts-config.xml获得它吗?如下所示

path="${redirectURL}"

No, you can't. 不,你不能。

The S1 config file is read at startup and does not store expressions that can be evaluated later. S1配置文件在启动时被读取,并且不存储稍后可以评估的表达式。

But there's no reason to; 但是没有理由 redirect from the action. 从操作重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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