top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the annotations used in Servlet 3?

0 votes
405 views
What are the annotations used in Servlet 3?
posted Sep 25, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

These are the lists of annotations used in Servlet 3:-

1. @WebServlet: To declare a servlet.

2. @WebInitParam: To specify an initialization parameter.

3. @WebFilter: To declare a servlet filter.

4. @WebListener: To declare a WebListener

5. @HandlesTypes: To declare the class types that a ServletContainerInitializer can handle.

6. @HttpConstraint: This annotation is used within the ServletSecurity annotation to represent the security constraints to be applied to all HTTP protocol methods for which a corresponding HttpMethodConstraint element does NOT occur within the ServletSecurity annotation.

7. @HttpMethodConstraint: This annotation is used within the ServletSecurity annotation to represent security constraints on specific HTTP protocol messages.

8. @MultipartConfig: Annotation that may be specified on a Servlet class, indicating that instances of the Servlet expect requests that conform to the multipart/form-data MIME type.

9. @ServletSecurity: This annotation is used on a Servlet implementation class to specify security constraints to be enforced by a Servlet container on HTTP protocol messages.

answer Nov 7, 2017 by Gn Guruswamy
...