Accessing the Context Path in a JSP Page

Accessing the context path in a JSP page is simply a matter of querying the pageContext‘s request object.

<html>
  ...
  <img src="${pageContext.request.contextPath}/fullPath.png" />
  ...
</html>

Add a comment