Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Spring MVC doesnt recognize css-file

 
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi community!

my spring-mvc-application doenst recognize the css-file.

Here is the code of the dispatcher-servlet:



webxml-file:
┬┤

And the jsp-file:



The css-file:


I hope you can help me
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resolved.

Do the following steps:

the css-folder has to be placed in the same directory, where the WEB-INF-folder is placed in.

2.: The lines

Have to be placed between </bean> and </beans>

Like:



3.: The web-xml is correct.

4.: Add the following taglib to your jsp:



5.: Adding the following lines into the header of your jsp:




6.: Have fun.

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use This :

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<link href="<c:url value="/design/css/reset.css" />" rel="stylesheet">
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic