Skip to content

Commit 7502bc7

Browse files
committed
12:25 29/08/2018
1 parent fcad7b0 commit 7502bc7

5 files changed

Lines changed: 69 additions & 28 deletions

File tree

‎spring-mvc-demo/pom.xml‎

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<groupId>com.jamal</groupId>
@@ -34,8 +35,8 @@
3435
<dependency>
3536
<groupId>jstl</groupId>
3637
<artifactId>jstl</artifactId>
37-
<version>1.2</version>
38-
</dependency>
38+
<version>1.2</version>
39+
</dependency>
3940
</dependencies>
4041
<build>
4142
<finalName>spring-mvc-demo</finalName>
@@ -49,6 +50,24 @@
4950
<target>1.8</target>
5051
</configuration>
5152
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-war-plugin</artifactId>
56+
<version>2.4</version>
57+
<configuration>
58+
<warName>spring-mvc-demo</warName>
59+
</configuration>
60+
</plugin>
61+
<plugin>
62+
<groupId>org.apache.tomcat.maven</groupId>
63+
<artifactId>tomcat7-maven-plugin</artifactId>
64+
<version>2.2</version>
65+
<configuration>
66+
<warFile>target/spring-mvc-demo.war</warFile>
67+
<path>/spring-mvc-demo</path>
68+
<contextReloadable>true</contextReloadable>
69+
</configuration>
70+
</plugin>
5271
</plugins>
5372
</build>
5473
</project>

‎spring-mvc-demo/src/main/resources/springMvcDemo.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
3030
<property name="prefix" value="/WEB-INF/views/"></property>
3131
<property name="suffix" value=".jsp"></property>
32+
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
3233
</bean>
3334
</beans>
Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
3-
<display-name>spring-mvc-demo</display-name>
4-
<welcome-file-list>
5-
<welcome-file>index.html</welcome-file>
6-
<welcome-file>index.htm</welcome-file>
7-
<welcome-file>index.jsp</welcome-file>
8-
<welcome-file>default.html</welcome-file>
9-
<welcome-file>default.htm</welcome-file>
10-
<welcome-file>default.jsp</welcome-file>
11-
</welcome-file-list>
12-
<servlet>
13-
<description>Spring Front Controller</description>
14-
<display-name>Spring Dispatcher Servlet</display-name>
15-
<servlet-name>springMvcDemo</servlet-name>
16-
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
17-
<init-param>
18-
<param-name>contextConfigLocation</param-name>
19-
<param-value>classpath:/springMvcDemo.xml</param-value>
20-
</init-param>
21-
<load-on-startup>1</load-on-startup>
22-
</servlet>
23-
<servlet-mapping>
24-
<servlet-name>springMvcDemo</servlet-name>
25-
<url-pattern>/</url-pattern>
26-
</servlet-mapping>
2+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
4+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
5+
id="WebApp_ID" version="3.1">
6+
<display-name>spring-mvc-demo</display-name>
7+
<welcome-file-list>
8+
<welcome-file>index.html</welcome-file>
9+
<welcome-file>index.htm</welcome-file>
10+
<welcome-file>index.jsp</welcome-file>
11+
<welcome-file>default.html</welcome-file>
12+
<welcome-file>default.htm</welcome-file>
13+
<welcome-file>default.jsp</welcome-file>
14+
</welcome-file-list>
15+
<servlet>
16+
<description>Spring Front Controller</description>
17+
<display-name>Spring Dispatcher Servlet</display-name>
18+
<servlet-name>springMvcDemo</servlet-name>
19+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
20+
<init-param>
21+
<param-name>contextConfigLocation</param-name>
22+
<param-value>classpath:/springMvcDemo.xml</param-value>
23+
</init-param>
24+
<load-on-startup>1</load-on-startup>
25+
</servlet>
26+
<servlet-mapping>
27+
<servlet-name>springMvcDemo</servlet-name>
28+
<url-pattern>/</url-pattern>
29+
</servlet-mapping>
2730
</web-app>

‎spring-mvc-java-config-demo/pom.xml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@
5050
<source>1.8</source>
5151
<target>1.8</target>
5252
</configuration>
53+
</plugin>
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-war-plugin</artifactId>
57+
<version>2.4</version>
58+
<configuration>
59+
<warName>spring-mvc-java-config-demo</warName>
60+
</configuration>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.apache.tomcat.maven</groupId>
64+
<artifactId>tomcat7-maven-plugin</artifactId>
65+
<version>2.2</version>
66+
<configuration>
67+
<warFile>target/spring-mvc-java-config-demo.war</warFile>
68+
<path>/spring-mvc-java-config-demo</path>
69+
<contextReloadable>true</contextReloadable>
70+
</configuration>
5371
</plugin>
5472
</plugins>
5573
</build>

spring-mvc-java-config-demo/src/main/webapp/index.jsp renamed to spring-mvc-java-config-demo/src/main/webapp/pindex.jsp

File renamed without changes.

0 commit comments

Comments
 (0)