I am trying to develop a REST style application with Spring but the url mapping is not working as I expected.
in web.xml I have
<servlet-mapping>
<servlet-name>UrlParsing</servlet-name>
<url-pattern>/device/</url-pattern>
</servlet-mapping>
in NetTRaceHQ-servlet.xml I have
<bean name="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/**/device/**">devicesController</prop>
</props>
</property>
</bean>
I would like to use to map the following urls to the devicesController
http://localhost:8080/NetTraceHQ/admin/device/1
http://localhost:8080/NetTraceHQ/admin/device/
http://localhost:8080/NetTraceHQ/admin/device enter code here
The current setting in NetTRaceHQ-servlet.xml works for
http://localhost:8080/NetTraceHQ/admin/device
but the others fail. I have tried
/**/device/*
/**/device
/**/device/**/
/admin/device/*
and more with no luck
Googled for answers and have not had any luck.