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

前端 未结 9 1379
小蘑菇
小蘑菇 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 05:59

    Your welcome page is set as That Servlet . So all css , images path should be given relative to that servlet DIR . which is a bad idea ! why do you need the servlet as a home page ? set .jsp as index page and redirect to any page from there ?

    are you trying to populate any fields from db is that why you are using servlet ?

提交回复
热议问题