When creating a servlet
, what is the difference between using the following patterns to define the URL? "/"
and "/*"
, using annotations and the specification 3.1.
@WebServlet("/")
@WebServlet("/*")
Which of these URL patterns should I use if I want my servlet to respond to any request? Are they the same or is there a difference between them?