SSH的框架整合
struts 控制用的 hibernate 操作数据库的 spring 用解耦的 第一步:先创建一个wed项目 。 第二步:配置struts2 1.添加Struts2所需要的基本jar包到 lib目录下 包名如下图: 2.在web.xml 文件里添加struts的过滤器配置如下:《提示:struts2-2.3版本》 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>ssh</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name>