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
Post a Comment