Oh.. I had a mistake while
testing them..
but I noticed...
request.getPathInfo() - becomes null when I don't use wildcards in the url
pattern.
request.getServletPath() - becomes empty when you use a url pattern name of a
servlet like - '/index.jsp' or '/*'.
but will have a name if it is written like this - '/anyServletName/index.jsp' or '/anyServletName/*'.
it will output - '/anyServletName'.
Regards,
Alex Sales.