Why should url-pattern in servlet mapping start with forward slash(/)
I was reading Head First JSP and Servlets book. I was going through the mapping of servlet. And my doubt here is <servlet> <servlet-name>test</servlet-name> <servlet-class>com.avinash.TestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>test</servlet-name> <url-pattern>/ServletBeer.do</url-pattern> </servlet-mapping> Why should the url-pattern start with forward slash( / )? What does the forward slash( / ) represent? Does it represent our webapp name? What happens if the url-pattern do not start with forward slash( / )? Is it a specification to start with forward slash( / )?