dispatcher inside snap not finding path. [message #699397] |
Thu, 21 July 2011 09:47  |
Eclipse User |
|
|
|
My dispatcherservlet inside my snap is getting called but it is not finding the path no matter what and I was wondering if there was an issue loading my bean. Here is the only Error message in the log.
Quote: ERROR start-signalling-6 System.err
INFO: Intializing Spring FrameworkServlet 'standard'
Then when I go to my page I get
Quote:Matched path '/web/index.htm' with mapping 'standard'
Did not translate path '/web/index.htm'
No mapping found for HTTP request with URI [/web/index.htm] in DispatcherServlet with name 'standard'
But I do have a RequestMapping("/web/index") and I tried it with a RequestMapping of "/index"
|
|
|
Re: dispatcher inside snap not finding path. [message #699415 is a reply to message #699397] |
Thu, 21 July 2011 10:07   |
Eclipse User |
|
|
|
Hi,
The Error you see in the log can be ignored, it's just a INFO level message getting output to system.err by tomcat for some reason, we are looking in to it. You RequestMapping should be fine assuming it comes straight after the mapping for your DispatcherServlet and that comes straight after the Snap path. So in your browser, you should be entering a path like this http://myServer.com:port/hostPath/snapsFilter/snapPath/DispatcherServlet/requestMapping. The snapPath is the one defined in your manifest header.
If this is all correct then check the Snaps filter in the host, it needs to cover all the dispatchers, otherwise the snap won't be able to find your requested view, a jsp for example.
<filter-mapping>
<filter-name>host-filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
Let me know it goes,
Thanks, Chris.
|
|
|
|
|
|
|
|
Re: dispatcher inside snap not finding path. [message #702337 is a reply to message #701887] |
Tue, 26 July 2011 04:28  |
Eclipse User |
|
|
|
Your bundle class-path should be set to something like '., ./classes' for web bundles. In the project settings, go to the build information and configure the source directories. At the bottom of that page you can configure the output directory. By default it's 'bin' but we tend to use something like 'target/classes'. I'm not sure how this will affect the build from Eclipse though, we use an external build process to produce our bundles. I suspect it will work as long as your project is both an OSGi bundle project and a WTP 'Dynamic Web Project' then it should all be fine.
|
|
|
Powered by
FUDForum. Page generated in 0.11321 seconds