javaweb referenced in the project js and css file path does not take effect

  

In writing a javaweb project when specially created two separate folder to put css and js files, when jsp page in the root directory, you can normally referenced by relative paths, but when I jsp page into another folder again when not working when the spirit found references to css and js files via a relative path, later acquired by using an EL expression after the project path basically solved the problem.

 

Use: in front of the relative path references js css file or add a piece of this EL expression

${pageContext.request.contextPath}

  

Guess you like

Origin www.cnblogs.com/lyd447113735/p/11950667.html