THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2eejavaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee javaee http://java.sun.com/xml/ns/j2eejavaee/web-app_2_45.xsd" version="2.45"> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> |
This will cause Spring to boot up and look for the /WEB-INF/applicationContext.xml file.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?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: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/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://activemqcamel.apache.org/camel/schema/spring http://activemqcamel.apache.org/camel/schema/spring/camel-spring.xsd"> <camelContext xmlns="http://activemqcamel.apache.org/camel/schema/spring"> <route> <from uri="seda:foo"/> <to uri="mock:results"/> </route> </camelContext> </beans> |
...
Code Block |
---|
src/main/webapp/WEB-INF web.xml applicationContext.xml |
You should update your Maven pom.xml to enable WAR packaging/naming like this...
Code Block | ||||
---|---|---|---|---|
| ||||
<project>
...
<packaging>war</packaging>
...
<build>
<finalName>[desired WAR file name]</finalName>
...
</build>
|
To enable more rapid development we hightly highly recommend the jetty:run maven plugin.
Please refer to the help for more information on using jetty:run - but briefly if you add the following to your pom.xml
Code Block | ||||
---|---|---|---|---|
| ||||
<build> <plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <webAppConfig> <contextPath>/</contextPath> </webAppConfig> <scanIntervalSeconds>10</scanIntervalSeconds> </configuration> </plugin> </plugins> </build> |
...