org.wildfly.swarm.undertow.descriptors

## Interface WebXmlContainer<T extends <any>>

- All Superinterfaces:
    JBossDeploymentStructureContainer<T>
  All Known Subinterfaces:
    JAXRSArchive, WARArchive

      public interface WebXmlContainer<T extends <any>>
      extends JBossDeploymentStructureContainer<T>

  Archive mix-in supporting manipulation of `web.xml`.
  Author:
    Ken Finnigan

- - ### Field Summary

    - ### Fields inherited from interface org.wildfly.swarm.spi.api.JBossDeploymentStructureContainer

      `PRIMARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH, SECONDARY_JBOSS_DEPLOYMENT_DESCRIPTOR_PATH`

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default T` | `addContextParam(String name, String... values)` Add a context parameter.
    `default T` | `addFaviconExceptionHandler()` Add the default WildFly Swarm `favicon.ico` handler.
    `default Servlet` | `addServlet(String servletName, String servletClass)` Add a servlet.
    `default WebXmlAsset` | `findWebXmlAsset()` Locate or create a `web.xml` asset.
    `default String` | `getContextParamValue(String name)` Retrieve the context parameter value.
    `default Servlet` | `servlet(String servletClass)` Retrieve a servlet by class.

    - ### Methods inherited from interface org.wildfly.swarm.spi.api.JBossDeploymentStructureContainer

      `addModule, addModule, excludeModule, excludeModule, getDescriptorAsset`

- - ### Method Detail

    - #### addContextParam

          default T addContextParam(String name,
                                    String... values)

      Add a context parameter.
      Parameters:
        `name` - The name of the context parameter.
        `values` - The values for the context parameter.
      Returns:
        This archive.

    - #### getContextParamValue

          default String getContextParamValue(String name)

      Retrieve the context parameter value.
      Parameters:
        `name` - The name of the context parameter.
      Returns:
        Thie value of the context parameter.

    - #### addFaviconExceptionHandler

          default T addFaviconExceptionHandler()
                                        throws IOException

      Add the default WildFly Swarm `favicon.ico` handler.
      Returns:
        This archive.
      Throws:
        `IOException`

    - #### addServlet

          default Servlet addServlet(String servletName,
                                     String servletClass)

      Add a servlet.
      Parameters:
        `servletName` - The name of the servlet.
        `servletClass` - The class of the servlet.
      Returns:
        This archive.

    - #### servlet

          default Servlet servlet(String servletClass)

      Retrieve a servlet by class.
      Parameters:
        `servletClass` - The servlet class.
      Returns:
        The servlet descriptor.

    - #### findWebXmlAsset

          default WebXmlAsset findWebXmlAsset()

      Locate or create a `web.xml` asset.
      Returns:
        The existing or new `web.xml`.

Copyright © 2018 JBoss by Red Hat. All rights reserved.