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'.
i would rather think of how the future will affect my design when creating a system. Then tell my self, "Wow, i never imagined that i have a strategy pattern here!"