---
title: "struts-config.xml 配置"
author: "blaiu"
date: "2009-07-12T10:36:21Z"
tags: []
categories: ["企业架构"]
slug: "struts-config-xml"
draft: false
lastmod: "2010-12-05T02:34:21Z"
id: 424138
url: "https://blaiu.iteye.com/blog/424138"
---

```java
<?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="cn.com.hello.formBean.UserForm"></form-bean>


  <global-exceptions/>
  <global-forwards/>
  <action-mappings>
<action path="/user"
    		name="userForm"
       		scope="request"
      		type="cn.com.hereonline.b2b.action.UserAction"
      		validate="false"
      		input="/web/page/login.jsp"
      		>
      		<forward name="success" path="/web/page/success.jsp"></forward>
      		<forward name="failure" path="/web/page/failure.jsp"></forward>
	</action>
 </action-mappings>

  <message-resources parameter="com.yourcompany.struts.ApplicationResources"/>
</struts-config>

```