In this simple hello world example you will see how to integrate Spring and Struts 2 using the struts2-spring-plugin. By doing this you can utilize the Spring's powerful Dependency Injection feature. To learn more about Dependency Injection refer this example. Step1: First add the org.springframework.web.context.ContextLoaderListener to the web.xml file. <?xml version="1.0" encoding="UTF-8"?> <web-app xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>Struts2Example14</display-name> <!-- Context Configuration locations for Spring XML files --> <context-param> <param-name> contextConfigLocation </param-name> ...
A site who helps developer to find out there solutions. We try our best to provide you the best suite solutions for your problems.Also we are ready to accept your suggestions.Please be co-operate with us for sake of your and our growing.