init
This commit is contained in:
20
web/WEB-INF/spring-servlet.xml
Normal file
20
web/WEB-INF/spring-servlet.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
|
||||
|
||||
<context:component-scan base-package="org.tparnell" />
|
||||
|
||||
<bean id="viewResolver"
|
||||
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass"
|
||||
value="org.springframework.web.servlet.view.JstlView" />
|
||||
<property name="prefix" value="/WEB-INF/jsp/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
</beans>
|
||||
22
web/WEB-INF/web.xml
Normal file
22
web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
|
||||
<display-name>TparnellStartingSpring</display-name>
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>tparnell</servlet-name>
|
||||
<servlet-class>
|
||||
org.springframework.web.servlet.DispatcherServlet
|
||||
</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>tparnell</servlet-name>
|
||||
<url-pattern>/welcome.jsp</url-pattern>
|
||||
<url-pattern>/welcome.html</url-pattern>
|
||||
<url-pattern>*.html</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
16
web/WEB-INF/welcome.jsp
Normal file
16
web/WEB-INF/welcome.jsp
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Getting started with spring mvc</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>${message}
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<div style="font-family: verdana; padding: 10px; border-radius: 10px; font-size: 12px; text-align:center;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
web/index.jsp
Normal file
16
web/index.jsp
Normal file
@@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: Tommy
|
||||
Date: 6/27/2015
|
||||
Time: 9:59 AM
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user