Here\'s the scenario.
My Java web application has following path
https://www.mywebsite.com:9443/MyWebApp
Let\'s say there is a JSP
The application name come from getContextPath.
getContextPath
I find this graphic from Agile Software Craftsmanship HttpServletRequest Path Decoding sorts out all the different methods that are available: