日期:2014-05-18 浏览次数:20711 次
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>samples</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>action2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
<?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="struts2" namespace="" extends="struts-default">
<global-results>
<result name="login" type="redirect">/login.jsp</result>
</global-results>
<action name="userLogin" class="hs.homs.action.UserLoginAction">
<result name="success" type="redirect">/entrust.action</result>
<result name="error">/login.jsp</result>
</action>
<action name="entrust" class="hs.homs.action.EntrustAction">
<result name="success">main.jsp</result>
<result name="add">main.jsp</result>
</action>
<action name="entrust_add" method="add" class="hs.homs.action.EntrustAction">
<result name="success">main.jsp</result>
</action>
</package>
</struts>
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userLogin] associated with context path [].
<Host name="localhost" appBase="E:/JavaProjects/demo2_publish"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %