0

I've had this simple jsp log-in form that used the css style sheet. It was working just fine until I included the web.xml file in my directory. Now the JSP file won't load the css files no matter what. I've tried changing the link address of the css in multiple different ways but with no luck.

I'm pretty positive that the web.xml file is the reason it's not loading because if I remove it, everything works again.

Here's my project structure:

enter image description here

Here's my login.jsp:

enter image description here

here's my web.xml: enter image description here

samatovS
  • 422
  • 4
  • 15

1 Answers1

0

Your web.xml includes /* in a security constraint, limiting access to all content of your application to those users with the role users. This means that, instead of serving your CSS file as requested to the browser, tomcat will redirect to the login.jsp as well (which is obviously an incorrect and not very stylish stylesheet)

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90