---
title: "Extjs3.x Struts2 -Json-plugin学习实例-搭建开发环境 02"
author: "wjt276"
date: "2010-10-26T12:00:48Z"
tags: ["JavaEE", "SUN", "Web", "XML", "json"]
categories: ["Web前端"]
slug: "extjs3-x-struts2-json-plugin-02"
draft: false
lastmod: "2010-10-28T14:08:53Z"
id: 794201
url: "https://wjt276.iteye.com/blog/794201"
---

这里的项目开发环境与其它普通的开发环境一样，只是配置Struts2有点区别，不过为了大家看到一致，我还是琯一下好了。

1、新建一个Web Project，项目名为 **struts2\_extjs**

2、引入相关的jar包，实际jar包的引用就是struts2的开发环境包，只是需要多加入一个**struts2-json-plugin-2.1.8.1.jar**句，我的如下：  
 

![](http://dl.iteye.com/upload/attachment/337390/73e4abb5-80ac-339c-8b7a-66abeeb18ec2.jpg)

 

3、配置web.xml文件，这也是正常的配置信息(配置Struts2)，如下：

 

```
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	xmlns="http://java.sun.com/xml/ns/javaee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
  <filter>
		<filter-name>struts2</filter-name>
		<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
</web-app>
```

 

 

4、struts2.xml文件等到后台代码完成再说，那样就好说点。