When I have "/" as my url-pattern, I can type into whatever I want after the slash in the address bar and land successfully onto the servlet. That is, both
http://localhost:8080/firstServlet/
as well as
http://localhost:8080/firstServlet/any_random_string
gives me the same result.
But when I have url-pattern blank then only http://localhost:8080/firstServlet/
works and everything. Please explain why.
There is something here and here similar but I don't understand it exactly.
The pattern "/*" is also behaving just like "/".