By default the Snaps example has the dispatcher servlet mapped to something like "/web/*" and the static resources in the root.
To have cleaner url's I tried altering this behavior by mapping the dispatcher servlet to the snap root and use:
<mvc:resources location="/jsp/**" mapping="/jsp/"/>
This didn't seem to work and the dispatcher servlet kept handling my jsp requests:
2012-02-22 01:55:41.669] INFO http-bio-8080-exec-1 org.eclipse.virgo.snaps.core.internal.webapp.url.PathUrlPattern Path '/register/jsp/index.jsp' matches pattern '/register'
[2012-02-22 01:55:41.670] INFO http-bio-8080-exec-1 o.eclipse.virgo.snaps.core.internal.webapp.url.UrlPatternMatcher Matched path '/register/jsp/index.jsp' with mapping 'register'
[2012-02-22 01:55:41.670] INFO http-bio-8080-exec-1 org.eclipse.virgo.snaps.core.internal.webapp.url.PathUrlPattern Translated path '/register/jsp/index.jsp' to '/jsp/index.jsp'
[2012-02-22 01:55:41.688] WARN http-bio-8080-exec-1 org.springframework.web.servlet.PageNotFound No matching handler method found for servlet request: path '/jsp/index.jsp', method 'GET', parameters map[[empty]]
I also tried using prettyfaces or tucky url rewrite but these libs aren't OSGi'ified yet, so they aren't that easy to implement either.
So I was wondering if there might be a good/easy workaround for this perhaps?
Would seem like an nice feature to have.
This problem might be related with the dispatcher servlet mapping ending with "*" somehow, but I thought I might check here first before diving into the snaps source code.
Would be nice if there was a little bit more technical info on how exactly the url handling/translations happen behind the scenes perhaps.
Thanks in advance,
Jochen
PS. I did managed to create a pretty neat dynamic JQuery mobile front-end so far on top of Snaps though.
[Updated on: Tue, 21 February 2012 20:28] by Moderator