Snaps issues with dispatchservlet mapped to (snap) root and separate resources folder [message #803923] |
Wed, 22 February 2012 01:22 |
|
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: Wed, 22 February 2012 01:28] Report message to a moderator
|
|
|
Re: Snaps issues with dispatchservlet mapped to (snap) root and separate resources folder [message #808055 is a reply to message #803923] |
Mon, 27 February 2012 10:37 |
|
Hi,
Can you confirm the entry for the dispatcher servlet comes after the jsp definition. Snaps dosn't change the way that the web.xml is processed in any way. I will be the usual ordering just like any other web app and snaps is only present as a filter. We have had tucky url rewriting working in the past but I can't think of an example of the top of my head.
Chris.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03575 seconds