利用MyEclipse配置S2SH三大框架篇-struts2配置

1、新建web project,取名为S2SH;

2、点击MyEclipse->Project Capabilities->Add Struts Capabilities...

利用MyEclipse配置S2SH三大框架篇-struts2配置_第1张图片

3、选择struts2.1,URL pattern选择/*

利用MyEclipse配置S2SH三大框架篇-struts2配置_第2张图片

4、点击“Next”,选择Struts2 Core Libraries、Struts2 Spring Libraries和Struts2 Testing Libraries

利用MyEclipse配置S2SH三大框架篇-struts2配置_第3张图片

5、点击“Finish”


6、web.xml会自动生成如下代码

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 
	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_3_0.xsd">
  <display-name></display-name>	
  <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>

你可能感兴趣的:(spring,Hibernate,框架,struts2,s2sh)