ItEr06S03ArquitecturaClientesItEr05S03: Spring integration in web application.

It has been tested, but test cases are not included in the commit.
This commit is contained in:
Óscar González Fernández 2009-04-29 12:10:37 +02:00 committed by Javier Moran Rua
parent 851fbb3cba
commit bf1a88f6f2
3 changed files with 57 additions and 13 deletions

View file

@ -55,6 +55,10 @@
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>org.navalplanner</groupId>
<artifactId>navalplanner-business</artifactId>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<!-- For enabling annotation-based configuration (in particular, required
for "@Autowired") -->
<context:annotation-config/>
</beans>

View file

@ -1,12 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
helloworld</display-name>
<display-name>helloworld</display-name>
<!-- It searches all navalplanner-business-spring-config.xml files, it can found several. There must be at least one.
It searches navalplanner-webapp-spring-config.xml. There must be just one.
It searches navalplanner-override-spring-config.xml to override some previous definitions. There could be several or none.
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/navalplanner-business-spring-config.xml classpath:/navalplanner-webapp-spring-config.xml classpath*:/navalplanner-override-spring-config.xml</param-value>
</context-param>
<!-- /// -->
<!-- DSP -->
<servlet>
@ -27,13 +35,29 @@
<display-name>ZK Session Cleaner</display-name>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
<!-- Spring listeners -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<!-- end Spring listeners -->
<servlet>
<description>ZK loader for ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<!-- Must. Specifies URI of the update engine (DHtmlUpdateServlet).
It must be the same as <url-pattern> for the update engine.
-->
<!--
Must. Specifies URI of the update engine
(DHtmlUpdateServlet). It must be the same as <url-pattern>
for the update engine.
-->
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
@ -58,10 +82,10 @@
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
<!-- //// -->
<welcome-file-list>
<welcome-file>myhello.zul</welcome-file>
</welcome-file-list>
</web-app>