petclinic-uncached
Changes
pom.xml 26(+7 -19)
readme.md 13(+0 -13)
src/main/webapp/WEB-INF/jsp/vets/vetList.jsp 36(+23 -13)
Details
pom.xml 26(+7 -19)
diff --git a/pom.xml b/pom.xml
index d5c7691..aa14247 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,8 +25,6 @@
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
<webjars-jquery.version>2.2.4</webjars-jquery.version>
- <dandelion.version>1.1.1</dandelion.version>
- <dandelion.datatables.version>1.1.0</dandelion.datatables.version>
<cobertura.version>2.7</cobertura.version>
@@ -54,6 +52,13 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
+ <!-- Uncomment bellow lines in order to deploy the Springboot Petlinic WAR file into an external Jetty -->
+ <!--exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-tomcat</artifactId>
+ </exclusion>
+ </exclusions-->
</dependency>
<dependency>
@@ -90,23 +95,6 @@
<artifactId>ehcache</artifactId>
</dependency>
- <!-- Dandelion -->
- <dependency>
- <groupId>com.github.dandelion</groupId>
- <artifactId>dandelion-jsp</artifactId>
- <version>${dandelion.version}</version>
- </dependency>
- <dependency>
- <groupId>com.github.dandelion</groupId>
- <artifactId>datatables-jsp</artifactId>
- <version>${dandelion.datatables.version}</version>
- </dependency>
- <dependency>
- <groupId>com.github.dandelion</groupId>
- <artifactId>datatables-export-itext</artifactId>
- <version>${dandelion.datatables.version}</version>
- </dependency>
-
<!-- webjars -->
<dependency>
<groupId>org.webjars</groupId>
readme.md 13(+0 -13)
diff --git a/readme.md b/readme.md
index bcedd41..d0ad14f 100644
--- a/readme.md
+++ b/readme.md
@@ -74,10 +74,6 @@ File -> Import -> Maven -> Existing Maven project
<td>Use of EhCache <a href="/src/main/java/org/springframework/samples/petclinic/config/CacheConfig.java">CacheConfig.java</a> <a href="/src/main/resources/ehcache.xml">ehcache.xml</a></td>
</tr>
<tr>
- <td>Dandelion</td>
- <td>DatatablesFilter, DandelionFilter and DandelionServlet registration <a href="/src/main/java/org/springframework/samples/petclinic/config/DandelionConfig.java">DandelionConfig.java</a></td>
- </tr>
- <tr>
<td>Spring MVC - XML integration</td>
<td><a href="/src/main/java/org/springframework/samples/petclinic/config/CustomViewsConfiguration.java">CustomViewsConfiguration.java</a></td>
</tr>
@@ -104,15 +100,6 @@ File -> Import -> Maven -> Existing Maven project
<a href="/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp#L12">sample usage in JSP</a></td>
</td>
</tr>
- <tr>
- <td>Dandelion-datatables</td>
- <td>
- <a href="/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp">ownersList.jsp</a>
- <a href="/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp">vetList.jsp</a>
- <a href="/src/main/webapp/WEB-INF/web.xml">web.xml</a>
- <a href="/src/main/resources/dandelion/datatables/datatables.properties">datatables.properties</a>
- </td>
- </tr>
</table>
diff --git a/src/main/webapp/WEB-INF/jetty-web.xml b/src/main/webapp/WEB-INF/jetty-web.xml
new file mode 100644
index 0000000..5bb92f0
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jetty-web.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+ <!-- Fix Jetty 9 issue -->
+ <!-- http://stackoverflow.com/questions/32643530/classpath-issue-between-jetty-maven-plugin-and-tomcat-jdbc-8-0-9-leading-to-ser -->
+ <Set name="parentLoaderPriority">true</Set>
+</Configure>
diff --git a/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp b/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp
index 2f86248..08b1605 100644
--- a/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp
+++ b/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp
@@ -3,31 +3,46 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %>
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
<petclinic:layout pageName="owners">
<h2>Owners</h2>
- <datatables:table id="owners" data="${selections}" row="owner"
- cssClass="table table-striped" pageable="false" info="false" export="pdf">
- <datatables:column title="Name" cssStyle="width: 150px;" display="html">
- <spring:url value="/owners/{ownerId}.html" var="ownerUrl">
- <spring:param name="ownerId" value="${owner.id}"/>
- </spring:url>
- <a href="${fn:escapeXml(ownerUrl)}"><c:out value="${owner.firstName} ${owner.lastName}"/></a>
- </datatables:column>
- <datatables:column title="Name" display="pdf">
- <c:out value="${owner.firstName} ${owner.lastName}"/>
- </datatables:column>
- <datatables:column title="Address" property="address" cssStyle="width: 200px;"/>
- <datatables:column title="City" property="city"/>
- <datatables:column title="Telephone" property="telephone"/>
- <datatables:column title="Pets" cssStyle="width: 100px;">
- <c:forEach var="pet" items="${owner.pets}">
- <c:out value="${pet.name}"/>
- </c:forEach>
- </datatables:column>
- <datatables:export type="pdf" cssClass="btn" cssStyle="height: 25px;"/>
- </datatables:table>
+ <table id="vets" class="table table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Name</th>
+ <th style="width: 200px;">Address</th>
+ <th>City</th>
+ <th style="width: 120px">Telephone</th>
+ <th>Pets</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="${selections}" var="owner">
+ <tr>
+ <td>
+ <spring:url value="/owners/{ownerId}.html" var="ownerUrl">
+ <spring:param name="ownerId" value="${owner.id}"/>
+ </spring:url>
+ <a href="${fn:escapeXml(ownerUrl)}"><c:out value="${owner.firstName} ${owner.lastName}"/></a>
+ </td>
+ <td>
+ <c:out value="${owner.address}"/>
+ </td>
+ <td>
+ <c:out value="${owner.city}"/>
+ </td>
+ <td>
+ <c:out value="${owner.telephone}"/>
+ </td>
+ <td>
+ <c:forEach var="pet" items="${owner.pets}">
+ <c:out value="${pet.name} "/>
+ </c:forEach>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
</petclinic:layout>
src/main/webapp/WEB-INF/jsp/vets/vetList.jsp 36(+23 -13)
diff --git a/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp b/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp
index d8e48e8..a46434a 100644
--- a/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp
+++ b/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp
@@ -2,24 +2,34 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %>
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
<petclinic:layout pageName="vets">
<h2>Veterinarians</h2>
- <datatables:table id="vets" data="${vets.vetList}" row="vet" cssClass="table table-striped"
- pageable="false" info="false">
- <datatables:column title="Name">
- <c:out value="${vet.firstName} ${vet.lastName}"/>
- </datatables:column>
- <datatables:column title="Specialties">
- <c:forEach var="specialty" items="${vet.specialties}">
- <c:out value="${specialty.name}"/>
- </c:forEach>
- <c:if test="${vet.nrOfSpecialties == 0}">none</c:if>
- </datatables:column>
- </datatables:table>
+ <table id="vets" class="table table-striped">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Specialties</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="${vets.vetList}" var="vet">
+ <tr>
+ <td>
+ <c:out value="${vet.firstName} ${vet.lastName}"/>
+ </td>
+ <td>
+ <c:forEach var="specialty" items="${vet.specialties}">
+ <c:out value="${specialty.name} "/>
+ </c:forEach>
+ <c:if test="${vet.nrOfSpecialties == 0}">none</c:if>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
<table class="table-buttons">
<tr>