用struts2时在控制台打印的警告信息。
Published by admin on 09月 1, 2008
用Sruts2时控制台打印了如下警告,谁知道具体是怎么回事啊。怎么可以避免这个警告。
2008-1-6 22:08:45 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
警告: No configuration found for the specified action: ‘user/Add.html’ in namespace: ‘/user’. Form action defaulting to ‘action’ attribute’s literal value.
配置文件:
<?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>
<package name=”com.wspa.action.userAction” extends=”struts-default” namespace=”/user”>
<action name=”Add” class=”com.wspa.action.userAction”>
<result >/hello.jsp </result>
<result name=”error”>/error.jsp </result>
<result name=”input”>/index.jsp </result>
</action>
</package>
页面提交:
<s:form action=”Add.html”>
查找资料。检查后,解决办法如下:
<s:form action=”Add.html”>
…
FROM类似于这样吧,去掉Add后面的.html就可以了

Add A Comment