论坛首页 入门技术论坛

No configuration found for the specified action

浏览 8992 次
该帖已经被评为新手帖
作者 正文
   发表时间:2008-06-20  
用惯了Struts1.1的朋友,在用struts2时可能会出现如下错误:

Tomcat 控制台打出如下警告:
WARN - No configuration found for the specified action: ‘xxxxx’in namespace: ‘/’. Form action defaulting to ‘action’ attribute’s literal value.

主要由于在写struts2表单时有给action指定全名,如:<s:form action=”xxxAction.do”…>,直接写成<s:form action=”xxxAction”…>即可,因为在struts.xml中struts.action.extension属性有指定啦。
   发表时间:2008-07-02  
struts.xml中struts.action.extension属性有指定啦。   
0 请登录后投票
   发表时间:2008-08-29  
我在struts.xml中配置了:
<constant name="struts.action.extension" value="shtml" />,在表单中,引用相关的Action:如moduleAction.java引用为:
<s:form action="module.shtml"> ... </s:form>
仍然有上述警告。
如果我引用为:即把扩展去掉,系统找不到这个Action,无法工作!
<s:form action="module"> ... </s:form>
什么原因呢?
0 请登录后投票
   发表时间:2008-09-11  
Acaleph 写道
我在struts.xml中配置了:
<constant name="struts.action.extension" value="shtml" />,在表单中,引用相关的Action:如moduleAction.java引用为:
<s:form action="module.shtml"> ... </s:form>
仍然有上述警告。
如果我引用为:即把扩展去掉,系统找不到这个Action,无法工作!
<s:form action="module"> ... </s:form>
什么原因呢?


在s:form里加上你的namespace即可.

<s:form namespace="/你的namespace" action="module"> ... </s:form>
0 请登录后投票
   发表时间:2008-09-18  
如果默认是不用加的话  如果我想加.action怎么办呢??如何设置 谢谢
0 请登录后投票
   发表时间:2008-10-22  
原来我程序:
<s:form name="pageform" action="../system/loginaction.action" method="post" theme="simple">
在tomcat中会打:
No configuration found for the specified action
我改成如下就OK了,不会打了
<s:form name="pageform" action="loginaction" method="post" namespace="/system">
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics