Hi everyone!
I have a problem with my web application based on Spring MVC. There is my web.xml url mapping :
and here is my dispatcher-servlet.xml file mapping :Code:<servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>*.ftl</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
As I understand all queries will be redirected to the urlMapping bean. It worsk fine, as expected.Code:<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/">indexController</prop> </props> </property> </bean>
The problem is that I cant get to my web resources (css, js files e.t.c.) my links lead to nowhere, so when im trying to load something like
it fails, as I can understand it redirects the path to the urlMapping handler which in turn fails to find url that is not specified in the config.HTML Code:<link href="/css/crazygrace.css" type="text/css" rel="stylesheet" />
is there something like best practice solution for this issue or may be Im doing something wrong?


Reply With Quote
