Struts2+Spring2.5+JPA(Hibernate3)环境搭建
1.新建Web工程 2.在classpath下建立META-INF目录,并在其中创建persistence.xml文件: org.hibernate.ejb.HibernatePersistence 3.在WEB-INF目录下建立applicationContext.xml文件: 4.在web.xml文件中配置Spring和Struts2: oa index.html index.htm index.jsp default.html default.htm default.jsp contextConfigLocation /WEB-INF/applicationContext*.xml org.springframework.web.context.ContextLoaderListener struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* encoding org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 encoding /* 5.在classpath下建立struts.xml文件,将Struts2委托Spring管理: