2010-3-9 14:56:15 org.apache.struts2.components.Form evaluateExtraParamsServl
警告: No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
或者
警告: No configuration found for the specified action: 'Login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.
index.jsp:
<body>
</body>
struts.xml:
<struts>
</struts>
web.xml:
<filter>
</filter>
<!-- FilterDispatcher是struts2中的核心过滤器,它将过滤出所有符合要求的请求,然后进行struts2的内部处理 -->
<filter-mapping>
</filter-mapping>
<welcome-file-list>
</welcome-file-list>
web.xml中的就不多说了,就说下struts.xml和jsp页面吧!我先是在struts.xml中配置了namespace="/"
警告: No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.。
下面就总结下:
一:如果jsp页面用的struts2标签,则xml中有namespace,页面的form中也必须有namespace同时form提交时那个action可以直接写xml中的<action
二:如果jsp页面用的struts1标签,则form提交时那个action必须写上action的绝对路径,如:/login.action,需要加.action,和namespace。