0

I've got the following problem on every single page I am trying to access

WARNING [http-nio-8080-exec-7] org.springframework.web.servlet.PageNotFound.noHandlerFound No mapping found for HTTP request with URI [/cart/%3Cc:url%20value='/resources/css/bootstrap.css'%20/%3E] in DispatcherServlet with name 'springmvc-dispatcher

There are warnings, but those resources are visible (both css and scripts are working, still gives errors), and I have nothing underlined in jsp files.

<link href="<c:url value='/resources/css/bootstrap.css' />" rel="stylesheet"/>

<script src="<c:url value="/resources/js/controllers.js"/>"></script>

I have above paths to css and js in every jsp file.

Project-Structure

enter image description here

And my filter mapping:

<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
lokusking
  • 7,396
  • 13
  • 38
  • 57
Artur
  • 111
  • 11
  • Did you added `` - as explained here - http://stackoverflow.com/questions/31346267/what-is-the-need-and-use-of-mvcdefault-servlet-handler? – Arpit Aggarwal Sep 06 '16 at 10:41
  • Yes. So intellij console is clear now and everything is working, but in a browser console I still have `GET http://localhost:8080/products/%3Cc:url%20value='/resources/css/bootstrap.css'%20/%3E ` Is it normal? @Arpit – Artur Sep 06 '16 at 10:56
  • 1
    Your tags aren't working as you can clearly see from the URL that is being called. So I highly doubt your JSP are actualy being server or parsed correctly. – M. Deinum Sep 06 '16 at 11:04
  • Do you have `JSTL` in your classpath? – Arpit Aggarwal Sep 06 '16 at 11:19
  • Yes, I do have JSTL in my classpath. – Artur Sep 06 '16 at 11:27
  • As @M.Deinum mentioned, check if `JSP` is compiled properly or not, because I can see `JSTL` tags are not processed - `http://localhost:8080/products/%3Cc:url%20value='/resources/‌​css/bootstrap.css'%2‌​0/%3E` – Arpit Aggarwal Sep 06 '16 at 11:33
  • Post some actuall configuration... Most of the things in your post aren't even relevant... – M. Deinum Sep 06 '16 at 11:47

1 Answers1

1

You haven't used DispatcherServlet in your mapping. Just try this.

<servlet>
        <servlet-name>appServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
        <async-supported>true</async-supported>
    </servlet>
Phoenix
  • 321
  • 3
  • 12