Returns the portion of the request URI that indicates the context
of the request.
Annoyingly you can't get to this from the
ServletContext so
you need to cache the value from a recent HttpServletRequest.
The context path always comes first in a request URI. The path starts
with a "/" character but does not end with a "/" character.
For servlets in the default (root) context, this method returns "".
The container does not decode this string.
WARNING: This method may return null if DWR has not received any
requests. If this method is called from outside of DWR, as the servlet
environment is starting up you should check for a null reply and try
again later.
The portion of the request URI that indicates the context or nullif DWR has not received and requests so far |