Fight With Me!!!

导航

struct框架

配置文件struct-config.xml
<?xml version="1.0"encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache SoftwareFoundation//DTD Struts Configuration 1.1//EN""http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
 

  
   <form-beans>
      
   </form-beans>
   
   <global-exceptions></global-exceptions>
   
   <global-forwards>
   </global-forwards>
   
   <action-mappings>
      <action path="/main"type="servlet.Search">
         <forward name="name"path="/a.jsp"></forward>
      </action>
      <action path="/login"type="servlet.Search">
         <forward name="success"path="/success.jsp"></forward>
         <forward name="fail"path="/fail.jsp"></forward>
      </action>
      <action path="/index"type="servlet.Search">
         <forward name="tt"path="/index.jsp"></forward>
      </action>
   </action-mappings>
   
   <message-resources parameter="" />
   
</struts-config>








web.xml
<?xml version="1.0"encoding="UTF-8"?>
<web-app>
   <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>0</load-on-startup>
   </servlet>
   <servlet-mapping>
      <servlet-name>action</servlet-name>
   
      <url-pattern>/*.do</url-pattern>
   </servlet-mapping>
</web-app>

posted on 2016-06-11 11:26  nickTimer  阅读(422)  评论(0编辑  收藏  举报