Hi Experts,
I am trying to come up with a simple spring application - with Spring MVC as the web layer.
Following best practices, I have broken down my app definitions into layers and so have different XML files for web, app and resources bean definitons.
However, after setting the "contextConfigLocation" parameter the URLs dont come up. They give the error - "The requested resource () is not available."
with the following lines in the log -
My web.xml looks like -Code:Jan 30 15:50:09 DEBUG .web.servlet.DispatcherServlet getLastModified DispatcherServlet with name 'myTestapp' determining Last-Modified value for [/myTestspringapp/login.rm] Jan 30 15:50:09 DEBUG .web.servlet.DispatcherServlet getLastModified No handler found in getLastModified Jan 30 15:50:09 DEBUG .web.servlet.DispatcherServlet doService DispatcherServlet with name 'myTestapp' processing request for [/myTestspringapp/login.rm] Jan 30 15:50:09 WARN ework.web.servlet.PageNotFound noHandlerFound No mapping found for HTTP request with URI [/myTestspringapp/login.rm] in DispatcherServlet with name 'myTestapp' Jan 30 15:50:09 DEBUG .web.servlet.DispatcherServlet processRequest Successfully completed request
Code:<context-param> <param-name>contextConfigLocation</param-name> <param-value> WEB-INF/springs/applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>myTestapp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myTestapp</servlet-name> <url-pattern>*.rm</url-pattern> </servlet-mapping>
I have confirmed that with the above config on, there is no - "myTestapp-servlet.xml" anywhere. Also that the individual XMLs imported under the applicationContext.xml are all loaded - confirmed from the logs. However, the page doesnt come up.
If I disable the "ContextLoaderListener and the config file config" + disable the "init param under dispatcher servlet" - and allow springs to load from a single myTestapp-servlet.xml, the pages come up fine - confirming that my views.xml and other URL configs are all configured ok.
Any clues what could be wrong.
Any help would be greatly appreciated ....
Cheers,
Dk


Reply With Quote
