搭建SSH框架的時候的struts-config.xml配置文件(用controller管理)

<?xml version="1.0" encoding="UTF-8"?>
<!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>
 <data-sources />
 <form-beans >
    <form-bean name="studentForm" type="org.demo.web.form.StudentForm" />

 </form-beans>

 <global-exceptions />
 <global-forwards />
 <action-mappings >
    <action
      attribute="studentForm"
      input="/login.jsp"
      name="studentForm"
      parameter="opt"
      path="/student"
      scope="request"
      type="org.demo.web.action.StudentAction">
      <forward name="success" path="/success.jsp" />
      <forward name="failure" path="/failure.jsp" />
      <forward name="ok" path="/ok.jsp" />
      <forward name="error" path="/error.jsp" />
    </action>

 </action-mappings>

 <controller>
  <set-property property="processorClass"
   value="org.springframework.web.struts.DelegatingRequestProcessor" />
 </controller>
 <message-resources parameter="org.demo.web.ApplicationResources" />
</struts-config>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章