Currently I am using
${pageContext.servletContext.contextPath}
or
${pageContext.request.contextPath}
to print the context path on the JSP page. It is working fine for the local server, but when I go live it prints blank instead of the actual path.
I am able to print the request port number as well as request method, but not the context path.
How is this caused and how can I solve it?