Annotation Type WebInitParam


@Target(TYPE) @Retention(RUNTIME) @Documented public @interface WebInitParam
The annotation used to declare an initialization parameter on a Servlet or Filter, within a WebFilter or WebServlet annotation.

E.g. @WebServlet(name="TestServlet", urlPatterns={"/test"},initParams={@WebInitParam(name="test", value="true")}) public class TestServlet extends HttpServlet { ...
Since:
Servlet 3.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • name

      String name
      Returns:
      name of the initialization parameter
    • value

      String value
      Returns:
      value of the initialization parameter
    • description

      String description
      Returns:
      description of the initialization parameter
      Default:
      ""