javax.servlet-api版本3.0.1具有注释文件夹,其中包含不同的注释类,其中servlet-
api版本2.5或更低版本(即版本2.4)不包含注释。
注释表示元数据。如果使用注释,则不需要部署描述符,即web.xml。例如,如果您
@WebServlet("/hello")在servlet文件中使用注释,则无需在web.xml文件中提及servlet映射。一些有用的注释是:
@HandlesTypes@HttpConstraint @HttpMethodConstraint@MultipartConfig@ServletSecurity@WebFilter@WebInitParam@WebListener@WebServlet



