1.index.jsp页面form标签未指定namespace属性。
<!--index.jsp代码-->
<%@taglib prefix="s" uri="/struts-tags"%> ... <s:form action="submit" method="post"> <s:textfield name="msg" label="叙述:"></s:textfield> <s:submit value="保存" name="save" method="save"></s:submit> <s:submit value="打印" name="print" method="print"></s:submit> </s:form>
<!--struts.xml配置-->
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <include file="struts-default.xml" /> <package name="struts2" namespace="/my" extends="struts-default"> <action name="submit" class="pro.action.MoreSubmitAction"> <result name="success">/index.jsp</result> </action> </package> </struts>
解决方法:在index.jsp的form标签加上namespace属性。跟struts.xml中namespace属性一致即可。
...
<s:form action="submit" method="post" namespace="/my"> <s:textfield name="msg" label="叙述:"></s:textfield> <s:submit value="保存" name="save" method="save"></s:submit> <s:submit value="打印" name="print" method="print"></s:submit> </s:form>
2.struts.xml默认放在src目录下,如修改了配置目录。同样会出现警告:No configuration found for the specified action: 'submit' in namespace
解决方法:
a.把struts.xml文件放到src目录。
b.修改web.xml文件。在web.xml加上以下代码(例如struts.xml配置在WEWB-INF目录下):
<init-param> <param-name>config</param-name> <param-value>../struts.xml</param-value> </init-param>
相关推荐
2. **警告:No configuration found for the specified action: 'sum.action' in namespace: ''** 这个警告通常是因为Struts2找不到指定的Action。如果在JSP中使用 `<s:form action=”sum.action”>`,对应的源文件...
: No configuration found for the specified action: 'fileUpLoad.action' in namespace: '/manager'. Form action defaulting to 'action' attribute's literal value. ``` **知识点解释:** 1. **问题描述:** ...
- 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 ...
The API's main purpose is not for transporting, delivering, and forwarding messages; this is the purview of applications such as sendmail and other Mail Transfer Agent (MTA) type programs. MUA-type...
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, ...
Here's a new version for the hollidays. Mainly minor improvements and some small bugfixes, but also a new 'ultimap like' feature called Code Filter for which you don't need any special hardware for. ...
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 ; ...
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 - ...
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 ...
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 ...
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 ...