Imagine request:
http://localhost:8080/myApp/reports/get.do and url-pattern /reports/*
We have:
- contextPath: /myApp (your app name with / at the begining)
- servletPath: /reports (it's the one defined in url-pattern with / at the begining and without *)
- pathInfo: /get.do (start with / everything in url after sevletPath)
But for url-pattern *.do you have:
- contextPath - the same
- servletPath - /reports/get.do (because it was matched to the url-pattern)
- pathInfo - null (because there is nothing left after servlet path)