Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
update SPR-12640 repro with webjars resources
Browse files Browse the repository at this point in the history
  • Loading branch information
bclozel committed Feb 4, 2015
1 parent 92fb8d1 commit 2af6d43
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion SPR-12640/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.1</version>
</dependency>

<!-- Apache Tiles
<dependency>
<groupId>org.apache.tiles</groupId>
Expand Down Expand Up @@ -252,7 +258,7 @@
<properties>
<cargo.container.id>tomcat8x</cargo.container.id>
<cargo.container.url>
http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.15/bin/apache-tomcat-8.0.15.zip
http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.18/bin/apache-tomcat-8.0.18.zip
</cargo.container.url>
</properties>
</profile>
Expand Down
2 changes: 2 additions & 0 deletions SPR-12640/src/main/webapp/WEB-INF/spring/servlet-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@

<mvc:resources mapping="/static/**" location="classpath:/static/" cache-period="120"/>

<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>

</beans>
5 changes: 4 additions & 1 deletion SPR-12640/src/main/webapp/WEB-INF/views/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="<c:url value="/static/style.css" />">
<link rel="stylesheet" type="text/css" href="<c:url value="/static/style.css" />">
<link rel="stylesheet" href="<c:url value="/webjars/bootstrap/3.3.1/css/bootstrap.min.css"/>"/>
<title>Home</title>
</head>
<body>
<h1>Home</h1>
<p>CSS Link: <c:url value="/static/style.css" /></p>
<p>CSS Link webjar: <c:url value="/webjars/bootstrap/3.3.1/css/bootstrap.min.css"/></p>
</body>
</html>

0 comments on commit 2af6d43

Please sign in to comment.