Jinwah50
Jul 8th, 2011, 06:04 AM
Hi,
I am trying to follow the Spring Mobile reference document http://static.springsource.org/spring-mobile/docs/1.0.x/reference/htmlsingle/
I am trying to implement the Device Resolution..
In the document it says add the follwing to your class path:
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<version>${org.springframework.mobile-version}</version>
</dependency>
Does this mean add it to the pom.xml?
Then it goes on to say add the following to you dispatch servlet...
<mvc:interceptors>
<!-- On pre-handle, resolve the device that originated the web request -->
<beans:bean class="org.springframework.mobile.device.DeviceResolverHa ndlerInterceptor" />
</mvc:interceptors>
I tried to add it to servlet-context.xml but I am getting a lot of errors...
When I add the dependency to the pom.xml I get
Description Resource Path Location Type
Failed to read artifact descriptor for org.springframework.mobile:spring-mobile-device:jar:${org.springframework.mobile-version} pom.xml /TestApp line 1 Maven Problem
And in the servlet-context.xml I get
Description Resource Path Location Type
Error occured processing XML 'The prefix "mvc" for element "mvc:interceptors" is not bound.'. See Error Log for more details servlet-context.xml /TestApp/src/main/webapp/WEB-INF/spring/appServlet Unknown Spring Beans Problem
I tried adding the spring-mobile-device-1.0.0.M3.jar file to the project, but this has not resolved the errors. The documentation does not seem to be that helpful as a step by step guide... even though it seems simple.
Any help appreciated!
Thanks
Jin
I am trying to follow the Spring Mobile reference document http://static.springsource.org/spring-mobile/docs/1.0.x/reference/htmlsingle/
I am trying to implement the Device Resolution..
In the document it says add the follwing to your class path:
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<version>${org.springframework.mobile-version}</version>
</dependency>
Does this mean add it to the pom.xml?
Then it goes on to say add the following to you dispatch servlet...
<mvc:interceptors>
<!-- On pre-handle, resolve the device that originated the web request -->
<beans:bean class="org.springframework.mobile.device.DeviceResolverHa ndlerInterceptor" />
</mvc:interceptors>
I tried to add it to servlet-context.xml but I am getting a lot of errors...
When I add the dependency to the pom.xml I get
Description Resource Path Location Type
Failed to read artifact descriptor for org.springframework.mobile:spring-mobile-device:jar:${org.springframework.mobile-version} pom.xml /TestApp line 1 Maven Problem
And in the servlet-context.xml I get
Description Resource Path Location Type
Error occured processing XML 'The prefix "mvc" for element "mvc:interceptors" is not bound.'. See Error Log for more details servlet-context.xml /TestApp/src/main/webapp/WEB-INF/spring/appServlet Unknown Spring Beans Problem
I tried adding the spring-mobile-device-1.0.0.M3.jar file to the project, but this has not resolved the errors. The documentation does not seem to be that helpful as a step by step guide... even though it seems simple.
Any help appreciated!
Thanks
Jin