struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="struts2" extends="struts-default">
<action name="regAction" class="com.ex.action.RegAction">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>
reg.jsp
<s:form action="regAction.action" >
<s:textfield name="username" label="username"></s:textfield><br/>
<s:password name="password" label="password"></s:password><br/>
<s:submit value=" reg "></s:submit>
</s:form>
在控制台上有警告信息
2010-12-13 11:40:06 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'regAction.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
处理方式
将reg.jsp中的 regAction.action的后缀.action去掉!