Browser can't access/find relative resources like CSS, images and links when calling a Servlet which forwards to a JSP

前端 未结 9 1352
小蘑菇
小蘑菇 2020-11-21 05:43

I\'m having trouble with loading CSS and images and creating links to other pages when I have a servlet forward to a JSP. Specifically, when I set my

9条回答
  •  情歌与酒
    2020-11-21 06:12

    short answer - add following line in the jsp which will define the base
    base href="/{root of your application}/"

提交回复
热议问题