[英]Action is not getting called in Struts 2
In my struts application action is not getting called instead of that page is getting refreshed . 在我的struts应用程序中,未调用操作,而是刷新了该页面。 after changing my library jar files.
更改我的库jar文件之后。 Before changing it worked fine.
在更改之前,它工作正常。
Below are the details of my LIB folder after changing 以下是更改后我的LIB文件夹的详细信息
the changes I have made 我所做的更改
struts2-core-2.3.16
struts2-jquery-plugin 3.7.0
struts2-jquery-grid-plugin 3.7.0
xwork-core-2.3.16
ognl-3.0.8
freemaker 2.3.20
You forgot to set the action attribute of the Struts form tag, by default it's a current action. 您忘记设置Struts表单标签的action属性,默认情况下它是当前操作。 Missing the action url in the form tag causes the effect of refresh.
在form标记中缺少操作url会导致刷新效果。 If you are used the developer mode which turns on by using a Struts configuration constant
如果您使用的开发人员模式通过使用Struts配置常量打开
<constant name="struts.devMode" value="true" />
or the corresponding property in the properties file whatever configuration you prefer, generally struts.xml
. 或属性文件中的相应属性,无论您喜欢
struts.xml
配置,通常是struts.xml
。 Then you should be notified if the value is incorrect there or Struts can't find an appropriate action configuration. 然后,如果该值不正确或者Struts找不到合适的操作配置,则应通知您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.