Absolute url in jsp -


I am experiencing problems in resolving relative URLs when including CSS, JS and images in my JSPS. The URLs change to refresh the page or click on the back button. I think the solution to the problem is to include external files using the absolute URL. But I can not know how to use contextual URLs and use it. Can anyone help me on this?

Is it looking for you? $ {PageContext.servletContext.contextPath}

... In your jsp:

  & lt; Link rel = "stylesheet" href = "$ {pageContext.servletContext.contextPath} /css/page.css" media = "all" type = "text / css" />  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -