`
Disney2002
  • 浏览: 53918 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

No configuration found for the specified action

阅读更多
用惯了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属性有指定啦。
分享到:
评论
6 楼 gyhgc 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">
5 楼 jy02411368 2008-09-18  
如果默认是不用加的话  如果我想加.action怎么办呢??如何设置 谢谢
4 楼 dryZeng 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>
3 楼 Acaleph 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>
什么原因呢?
2 楼 hnbylibin 2008-07-02  
1 楼 hnbylibin 2008-07-02  
struts.xml中struts.action.extension属性有指定啦。   

相关推荐

    struts2开发遇到的问题

    2. **警告:No configuration found for the specified action: 'sum.action' in namespace: ''** 这个警告通常是因为Struts2找不到指定的Action。如果在JSP中使用 `&lt;s:form action=”sum.action”&gt;`,对应的源文件...

    报错 代码 经验

    : No configuration found for the specified action: 'fileUpLoad.action' in namespace: '/manager'. Form action defaulting to 'action' attribute's literal value. ``` **知识点解释:** 1. **问题描述:** ...

    BURNINTEST--硬件检测工具

    - Minor changes to the No operation error watchdog timer for the CD and Hard disk tests. - Minor correction to the Butterfly seek test. - Video playback trace logging increased. Release 5.3 build ...

    Java邮件开发Fundamentals of the JavaMail API

    things like the last mail received and calculate how many are new for you. So, when using the JavaMail API, if you want this type of information, you have to calculate it yourself. IMAP IMAP is a...

    OutlookAttachView v2.73

    o Added option to scan only emails with the specified 'From' and 'To' strings. * Version 1.82 o When adding a folder to scan (with the Add button), the folder path in now delimited with quotes, ...

    Turbo C 2.01[DISK]

    When /P is specified, the EGA palette will be restored each time the screen is swapped. In general, you don't need to use this switch unless your program modifies the EGA palette registers, or ...

    Turbo C 2.00[DISK]

    When /P is specified, the EGA palette will be restored each time the screen is swapped. In general, you don't need to use this switch unless your program modifies the EGA palette registers, or ...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    is now available for writing (during the writing, the standard grid object TFlexGrid is released, and a user's one is set). - ADD: In the class TFlexGrid added the properties HOffset and VOffset - ...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    For this reason, the functions that handle these actions offer the option of waiting until the action is complete before returning (so-called synchronous operation); although they can be called in an ...

    php.ini-development

    Please see the actual settings later in the document for more details as to why ; we recommend these changes in PHP's behavior. ; display_errors ; Default Value: On ; Development Value: On ; ...

    CE中文版-启点CE过NP中文.exe

    Fixed the found code dialog count size Fixed mono freezing Cheat Engine when it crashes/freezes Additions and changes: Changed the processlist and added an Applications view similar to the ...

Global site tag (gtag.js) - Google Analytics