Integration of the SSH framework (struts-2.5.5+spring-4.3.4+hibernate-5.2.4)

Source: Internet
Author: User
Tags aop xmlns ssh
Integration of the SSH framework (struts-2.5.5+spring-4.3.4+hibernate-5.2.4) 1.jdk-1.8 TOMCAT7 Environment 2. Create a Web Project 3. Guide Package (Struts+spring+hibernate) 4. Create Struts.xml and Spring.xml (applicationcontext.xml) struts.xml header in SRC to add several common properties (not added) <?xml version= "1.0" Encodi ng= "UTF-8"?> <!
                        DOCTYPE struts Public "-//apache software foundation//dtd struts Configuration 2.5//en" "Http://struts.apache.org/dtds/struts-2.5.dtd" > <struts> <!--disable dynamic method access  --<constant name= "Struts.enable.DynamicMethodInvocation" value= "false"/> <!-- configured for Development mode--<constant name= "Struts.devmode" value= "true"/> </struts> spring.x ML <?xml version= "1.0" encoding= "UTF-8"?> <beans xmlns= "http://www.springframework.org/schema/be Ans "xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "xmlns:aop=" Http://www.springframe WoRk.org/schema/aop "xmlns:context=" Http://www.springframework.org/schema/context "xmlns:tx=" H
                Ttp://www.springframework.org/schema/tx "xsi:schemalocation=" Http://www.springframework.org/schema/beans Http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/ Schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www . SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/spring-aop.xsd H

        Ttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd "> </beans> 5. Configure Web. XML 5.1 Add struts2 filter <filter> <filter-name>struts2</filte R-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filte R-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-
            Pattern>/*</url-pattern> </filter-mapping> 5.2 Register Spring Listener <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </
            Listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:spring.xml</param-value> </context-param>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.