Where do CSS and JavaScript files go in a Maven web app project?

前端 未结 5 1582
余生分开走
余生分开走 2020-12-02 07:40

I am switching to use Maven for my Spring web app projects and I am running into a simple issue. I am not sure where to put the CSS and JS files in the new project structure

5条回答
  •  再見小時候
    2020-12-02 08:12

    org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/appname/css/myStyles.css] in DispatcherServlet

    This indicates a configuration problem with your web.xml/spring context file. DispatcherServlet should not be processing a request for a css resource.

    If this does not help troubleshoot the problem, you may want to post relevant snippets of your web.xml and spring context file.

提交回复
热议问题