WebInitParam (Servlet 6.1 API Documentation - Apache Tomcat 11.0.23)
Description: declaration: package: jakarta.servlet.annotation, annotation type: WebInitParam

# Annotation Interface 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. `&#064;WebServlet(name="TestServlet", urlPatterns={"/test"},initParams={&#064;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
  `String`
  `name`
  The name of the initialization parameter.
  `String`
  `value`
  The value of the initialization parameter.

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `String`
  `description`
  A description of the initialization parameter.

- ## Element Details

  - ### name

    String name
    The name of the initialization parameter.
    Returns:
      name of the initialization parameter

  - ### value

    String value
    The value of the initialization parameter.
    Returns:
      value of the initialization parameter

  - ### description

    String description
    A description of the initialization parameter.
    Returns:
      description of the initialization parameter
    Default:
      `""`