KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Morning, Having issues mapping a controller to / (i.e. localhost:8080/someApp/ would map to @Controller("/")) while also using mvc:resources web.xml mapping: <servlet-mapping> <servlet-name>springServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> mvc:resources <mvc:resources mapping="/resources/**" location="/resources/" /> The server loads the page correctly, but when I map to an asset i.e. <link type="text/css" rel="stylesheet" href="<c:url value="/resources/css/blueprint/print.css"/>" /> When clicking the css file via view-source in a web browser, the server response maps back to the index page, rather than the resource. Leads me to believe it's related to the servlet-mapping. Any help with this would be great! Thanks! Edit: Forgot to mention, if I bind the controller to say: @Controller("/pages") Everything works fine, just would rather have the context root be able to respond correctly.
Tags (comma-separated)
Save Edits
Cancel