Skip to content

Commit

Permalink
make the sample work on checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
jettro committed Nov 28, 2010
1 parent ce81e41 commit 389a4c0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 35 deletions.
9 changes: 7 additions & 2 deletions SpringMobileSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ repositories {
def springVersion="3.0.5.RELEASE"
slf4jVersion="1.5.8"
dependencies {
// spring dependencies
compile "org.springframework.mobile:spring-mobile-device:1.0.0.M1",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-webmvc:$springVersion"

// web technologies
compile "javax.servlet:jstl:1.1.2",
"javax.servlet:servlet-api:2.5",
"taglibs:standard:1.1.2"

// Standard dependencies for logging and stuff
// mobile technologies
runtime "net.sourceforge.wurfl:wurfl:1.2"

// Standard dependencies for logging and stuff
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion",
"org.slf4j:jul-to-slf4j:$slf4jVersion"
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"

compile("log4j:log4j:1.2.15") {
exclude group: "com.sun.jdmk", module: "jmxtools"
exclude group: "com.sun.jmx", module: "jmxri"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/mobile/device http://www.springframework.org/schema/mobile/device/spring-mobile-device-1.0.xsd">

<mvc:interceptors>
<bean class="nl.gridshore.samples.springmobile.web.WithOverruleDeviceResolvingHandlerInterceptor"/>
<!--<constructor-arg>-->
<!--<device:wurfl-device-resolver root-location="/WEB-INF/wurfl/wurfl-2.0.25.zip"/>-->
<!--</constructor-arg>-->
<!--</bean>-->
<bean class="org.springframework.mobile.device.mvc.DeviceResolvingHandlerInterceptor">
<constructor-arg>
<device:wurfl-device-resolver root-location="/WEB-INF/wurfl/wurfl-2.0.25.zip"/>
</constructor-arg>
</bean>
</mvc:interceptors>

<!--<mvc:interceptors>-->
<!--<bean class="nl.gridshore.samples.springmobile.web.WithOverruleDeviceResolvingHandlerInterceptor"/>-->
<!--</mvc:interceptors>-->

<context:component-scan base-package="nl.gridshore.samples.springmobile.web"/>

<mvc:annotation-driven/>
Expand Down
56 changes: 28 additions & 28 deletions SpringMobileSample/src/main/webapp/WEB-INF/views/device/info.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@

<h2>Basic Device info</h2>
<table>
<%--<tr>--%>
<%--<td>id</td>--%>
<%--<td><c:out value="${device.id}"/></td>--%>
<%--</tr>--%>
<%--<tr>--%>
<%--<td>UserAgent</td>--%>
<%--<td><c:out value="${device.userAgent}"/></td>--%>
<%--</tr>--%>
<%--<tr>--%>
<%--<td>MarkUp</td>--%>
<%--<td><c:out value="${device.markUp}"/></td>--%>
<%--</tr>--%>
<tr>
<td>id</td>
<td><c:out value="${device.id}"/></td>
</tr>
<tr>
<td>UserAgent</td>
<td><c:out value="${device.userAgent}"/></td>
</tr>
<tr>
<td>MarkUp</td>
<td><c:out value="${device.markUp}"/></td>
</tr>
<tr>
<td>Is mobile</td>
<td><c:out value="${device.mobile}"/></td>
</tr>
<%--<tr>--%>
<%--<td>Description</td>--%>
<%--<td><c:out value="${device}"/></td>--%>
<%--</tr>--%>
</table>
<h2>Capabilities</h2>
<table>
<tr>
<td>Description</td>
<td><c:out value="${device}"/></td>
<th>key</th>
<th>value</th>
</tr>
</table>
<%--<h2>Capabilities</h2>--%>
<%--<table>--%>
<%--<tr>--%>
<%--<th>key</th>--%>
<%--<th>value</th>--%>
<%--</tr>--%>
<%--<c:forEach var="item" items="${device.capabilities}">--%>
<%--<tr>--%>
<%--<td><c:out value="${item.key}"/></td>--%>
<%--<td><c:out value="${item.value}"/></td>--%>
<%--</tr>--%>
<%--</c:forEach>--%>
<%--</table>--%>
<c:forEach var="item" items="${device.capabilities}">
<tr>
<td><c:out value="${item.key}"/></td>
<td><c:out value="${item.value}"/></td>
</tr>
</c:forEach>
</table>

0 comments on commit 389a4c0

Please sign in to comment.