Software version:
Glassfish 4.1.x
In a JSP, when trying to access the context path, the following code works (for me):
${pageContext.request.contextPath}
However, when shorten to:
${request.contextPath}
then, either it does not evaluate and therefore evaluated to empty string; or it did work, and simply evaluated to an empty string.
Should not the request
object be available, as specified by implicit objects in a JSP? If that it is available, then accessing the context path should work with the shortened version.
Please explain this discrepancy.