`

No configuration found for the specified action 原因及解决方案

 
阅读更多

警告: No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
引发原因:底层原因本人不是太清楚,但我理解的是,由于请求页面的namespace属性与struts.xml的namespace属性值不一致引起的,这种警告基本上不会影响系统的运行,但对于一个追求完善的人来说,不得不说,这并不是一道好的风景。所以,这里,提供一个小小的解决方案供朋友们参与。

 

发警告的的关键之处是:

jsp页面中,<s:form action="login" method="post">,此处没有指明namespace属性的值,所以系统会自动的认为namespace的值为警告信息中的那样,namespace: ''

而struts.xml文件中,我们指定的namespace的值为:namespace="/",两处的namespace的值不一致,从而导致了警告的产生。

所以,解决方法很简单,将两个页面的namespace的值改成一样的就行了。这里我修改了jsp页面,修改内容如下:

<s:form action="login" method="post" namespace="/">

 

另外补充一点,这种情况一般发生在Tomcat 6.0及其以后的版本,之前版本的不会发出这种警告。如果不是系统功能的需要,建议不要使用最新版本的服务器。

分享到:
评论

相关推荐

    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 ...

    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, ...

    Java邮件开发Fundamentals of the JavaMail API

    Fundamentals of the JavaMail API Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click ...

    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 ...

    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 ...

    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 - ...

    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 ...

    DebuggingWithGDB 6.8-2008

    4.1 Compiling for Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Starting your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Global site tag (gtag.js) - Google Analytics