mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +00:00
styles
This commit is contained in:
parent
7ff5e857fd
commit
556824d7c7
9 changed files with 189 additions and 12 deletions
|
@ -22,11 +22,41 @@
|
|||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<!-- Needed for fileupload -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<!-- Embedded database -->
|
||||
<dependency>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>1.8.0.7</version>
|
||||
</dependency>
|
||||
<!-- Composite-view & layout framework -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tiles</groupId>
|
||||
<artifactId>tiles-core</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tiles</groupId>
|
||||
<artifactId>tiles-jsp</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
<!-- Clean URLs with JSPs -->
|
||||
<dependency>
|
||||
<groupId>org.tuckey</groupId>
|
||||
<artifactId>urlrewritefilter</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<!-- Spring Framework Project libraries -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
|
@ -57,6 +87,12 @@
|
|||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<!-- Spring JavaScript Project -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>spring-js</artifactId>
|
||||
<version>2.0.7.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- Container-provided dependencies-->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page session="false" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
Congratulations! You're running Spring!
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
||||
<h2>Welcome to the Spring 3 Petclinic</h2>
|
||||
<img id="petlogo" src="${pageContext.request.contextPath}/resources/images/pets.png" />
|
||||
<p>
|
||||
This sample application demonstrates many of the features Spring provides for web application development.
|
||||
</p>
|
|
@ -28,9 +28,21 @@
|
|||
<!-- VIEW RESOLUTION AND RENDERING -->
|
||||
|
||||
<!-- Resolves view names to protected .jsp resources within the /WEB-INF directory -->
|
||||
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
|
||||
<!-- Configures Tiles 2 -->
|
||||
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer" />
|
||||
|
||||
<!-- Configures Apache Commons Fileupload -->
|
||||
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="maxUploadSize" value="10000000"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
|
||||
<urlrewrite default-match-type="wildcard">
|
||||
<rule>
|
||||
<from>/resources/**</from>
|
||||
<to>/resources/$1</to>
|
||||
</rule>
|
||||
<rule>
|
||||
<from>/**</from>
|
||||
<to>/app/$1</to>
|
||||
|
|
|
@ -33,4 +33,17 @@
|
|||
<url-pattern>/app/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Serves static resource content from the webapp root & .jar files such as spring-js.jar -->
|
||||
<servlet>
|
||||
<servlet-name>Resources Servlet</servlet-name>
|
||||
<servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
|
||||
<load-on-startup>0</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<!-- Map all /resources requests to the Resource Servlet for handling -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>Resources Servlet</servlet-name>
|
||||
<url-pattern>/resources/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -0,0 +1,118 @@
|
|||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url(../images/banner-graphic.png);
|
||||
background-position: top;
|
||||
background-repeat: no-repeat;
|
||||
width: 820px;
|
||||
margin: auto;
|
||||
margin-top: 60px;
|
||||
font-family:verdana;
|
||||
font-size: 62.5%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
#header {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#signin {
|
||||
float: right;
|
||||
list-style: none;
|
||||
width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#signin li{
|
||||
display: inline;
|
||||
padding: 0 2px;
|
||||
border-left: 1px solid #000;
|
||||
margin-left: -1px;
|
||||
}
|
||||
#signin li a{
|
||||
|
||||
}
|
||||
#nav {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 600px;
|
||||
clear: right;
|
||||
padding: 1em;
|
||||
}
|
||||
#nav ul {
|
||||
list-style: none;
|
||||
}
|
||||
#nav ul li {
|
||||
display: inline;
|
||||
}
|
||||
#nav ul li a {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 150px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
#sidebar {
|
||||
float: left;
|
||||
width: 200px;
|
||||
}
|
||||
#sub-nav {
|
||||
list-style: none;
|
||||
}
|
||||
#sub-nav li {
|
||||
display: inline;
|
||||
}
|
||||
#sub-nav li a {
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* content */
|
||||
#content{
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#petlogo {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#main{
|
||||
padding-left: 200px;
|
||||
}
|
||||
#main label{
|
||||
display: block;
|
||||
padding: 1em 0;
|
||||
}
|
||||
/* content - application */
|
||||
|
||||
#footer {
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
#copyright{
|
||||
float: left;
|
||||
}
|
||||
ul#legal{
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
}
|
||||
ul#legal li{
|
||||
display: inline;
|
||||
padding: 0px 4px 0px 5px;
|
||||
border-left: 1px solid #000;
|
||||
margin-left: -1px;
|
||||
}
|
||||
ul#legal li a{
|
||||
|
||||
}
|
Loading…
Reference in a new issue