Java/Tomcat 7 can't get local stylesheets to work

I'm new to java development and I've started playing around using Eclipse and Tomcat 7 to create some simple pages and get more used to it but I've run into a bit of a weird issue. I've created a simple "Hello World" jsp page, that in the head has a reference to a stylesheet using a `` tag e.g `` .The path is correct, and even if I try it with a fully qualified path it doesn't work. If I link to an external stylesheet it does show however. I've looked around and the main suggestion I can find is adding a servlet-mapping with a name of default to *.css in my web.xml . I have done this but this still doesn't appear to work. Using `

Hello World

my web.xml in the WEB-INF directory has the following: test index.html index.htm index.jsp default.html default.htm default.jsp default *.css Thanks
Could you provide the contents of your web.xml as well as the path of the style.css file relative to your project? Did you try to manually access the css from the browser?

以上就是Java/Tomcat 7 can't get local stylesheets to work的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏