测试环境: JDK 1.5 + HIBERNATE 3 + STRUTS 1.2.9 TOMCAT 5 + WIN XP
-----------------------------------------------------------------------
点击登录出现 :
Status reportServlet action is not availableThe requested resource (Servlet action is not available) is not available.----------------------------------------------------------------------
-----------------------------------------------------------------------
点击登录出现 :
Status reportServlet action is not availableThe requested resource (Servlet action is not available) is not available.----------------------------------------------------------------------
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"><web-app> <!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup> </servlet> <!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping> <!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib> <taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib></web-app>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config> <form-beans>
<form-bean name="LoginForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
</form-beans>
<global-forwards
type="org.apache.struts.action.ActionForward">
<forward name="toWrong" path="/wrong.jsp"/>
<forward name="toSuccess" path="/MainFrame.jsp"/>
</global-forwards>
<action-mappings>
<action path="/login" type="cn.ocsky.LoginAction" name="LoginForm" scope="request" input="/wrong.jsp" />
</action-mappings>
<controller processorClass="cn.ocsky.MyRequestProcessor"/>
<message-resources parameter="cn.ocsky.MyResource"/>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
<set-property property="stopOnFirstError" value="false"/>
</plug-in>
</struts-config>