⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 struts-config.xmltemplate.txt

📁 刚用java做的网上购物车 做毕业论文用的 有需要的朋友可以参考下
💻 TXT
字号:
<?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="userForm" type="tarena.form.UserForm" />
		<form-bean name="loginForm" type="tarena.form.LoginForm" />
	</form-beans>

	<global-exceptions />
	<global-forwards />
	<action-mappings>

		<!-- 首页模块 -->
		<action path="/bookinfo"
			type="org.springframework.web.struts.DelegatingActionProxy"
			validate="false">
			<forward name="toIndex" path="/index/index.jsp"
				contextRelative="true" />
		</action>

		<!-- 首页模块 -->
		<action parameter="method" path="/fY"
			type="org.springframework.web.struts.DelegatingActionProxy"
			validate="false">
			<forward name="toIndex" path="/index/index.jsp"
				contextRelative="true" />
		</action>

		<!-- 用户管理模块之注册 -->
		<action attribute="userForm" input="/user/user_register.jsp"
			name="userForm" parameter="registerUser" path="/user" scope="request"
			type="org.springframework.web.struts.DelegatingActionProxy">
			<forward name="fail" path="/user/fail.jsp" redirect="true" />
			<forward name="toIndex" path="/index/index.jsp"
				redirect="true" />
			<forward name="refresh" path="/user/user_info.jsp"
				redirect="true" />
			<forward name="success" path="/user/user_login.jsp"
				redirect="true" />
		</action>

		<!-- 用户管理模块之登录 -->
		<action
      attribute="loginForm"
      name="loginForm"
      parameter="loginUser"
      path="/login"
      scope="request"
      type="org.springframework.web.struts.DelegatingActionProxy">
      <forward
        name="fail"
        path="/user/fail.jsp"
        redirect="true" />
      <forward
        name="toIndex"
        path="/index/index.jsp"
        contextRelative="true" />
    </action>

		<!-- 用户管理模块之修改 -->
		<action
      attribute="userForm"
      name="userForm"
      parameter="updateUser"
      path="/update"
      scope="request"
      type="org.springframework.web.struts.DelegatingActionProxy">
      <forward
        name="fail"
        path="/user/fail.jsp"
        redirect="true" />
      <forward
        name="refresh"
        path="/user/user_info.jsp"
        redirect="true" />
    </action>
    
    
    <!-- 购物车管理模块 -->
    <action
      parameter="method"
      path="/shopcart"
      type="org.springframework.web.struts.DelegatingActionProxy"
      validate="false">
      <forward
        name="toListShopcart"
        path="/shopcart/shopcart.jsp"
        redirect="true" />
      <forward
        name="toIndex"
        path="/index/index.jsp"
        contextRelative="true" />
      <forward
        name="refresh"
        path="/shopcart/shopcart.jsp"
        redirect="true" />
    </action>
    
    <action
      parameter="method"
      path="/order"
      type="org.springframework.web.struts.DelegatingActionProxy"
      validate="false">
      <forward
        name="fail"
        path="/order/fail.jsp"
        redirect="true" />
      <forward
        name="refresh"
        path="/order/order_history.jsp"
        redirect="true" />
      <forward
        name="success"
        path="/order/order_success.jsp"
        redirect="true" />
    </action>
	</action-mappings>


	<!-- 更改RequestProcessor为Spring所提供的 -->
	<controller
		processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />


	<message-resources parameter="tarena.conf.ApplicationResources" />

	<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
		<set-property property="pathnames"
			value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
	</plug-in>

	<plug-in
		className="org.springframework.web.struts.ContextLoaderPlugIn">
		<set-property property="contextConfigLocation"
			value="/WEB-INF/applicationContext.xml" />
	</plug-in>
</struts-config>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -