org.eclipse.jetty.webapp

## Class TagLibConfiguration

- java.lang.Object
- - org.eclipse.jetty.webapp.AbstractConfiguration
  - - org.eclipse.jetty.webapp.TagLibConfiguration

- All Implemented Interfaces:
    Configuration

      public class TagLibConfiguration
      extends AbstractConfiguration

  TagLibConfiguration. The class searches for TLD descriptors found in web.xml, in WEB-INF/*.tld files of the web app or *.tld files within jars found in WEB-INF/lib of the webapp. Any listeners defined in these tld's are added to the context. <bile>This is total rubbish special case for JSPs! If there was a general use-case for web app frameworks to register listeners directly, then a generic mechanism could have been added to the servlet spec. Instead some special purpose JSP support is required that breaks all sorts of encapsulation rules as the servlet container must go searching for and then parsing the descriptors for one particular framework. It only appears to be used by JSF, which is being developed by the same developer who implemented this feature in the first place! </bile> Note- this has been superceded by the new TldScanner in jasper which uses ServletContainerInitializer to find all the listeners in tag libs and register them.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `TagLibConfiguration.TagLibListener` TagLibListener A listener that does the job of finding .tld files that contain (other) listeners that need to be called by the servlet container.
    `static class` | `TagLibConfiguration.TldDescriptor` TldDescriptor
    `class` | `TagLibConfiguration.TldProcessor` TldProcessor Process TldDescriptors representing tag libs to find listeners.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TLD_RESOURCES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TagLibConfiguration()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cloneConfigure(WebAppContext template, WebAppContext context)` Clone configuration instance.
    `void` | `configure(WebAppContext context)` Configure WebApp.
    `void` | `deconfigure(WebAppContext context)` DeConfigure WebApp.
    `void` | `postConfigure(WebAppContext context)` Clear down after configuration.
    `void` | `preConfigure(WebAppContext context)` Set up for configuration.

    - ### Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration

      `destroy`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TLD_RESOURCES

          public static final String TLD_RESOURCES

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TagLibConfiguration

          public TagLibConfiguration()

  - ### Method Detail

    - #### preConfigure

          public void preConfigure(WebAppContext context)
                            throws Exception

      Description copied from interface: `Configuration`
      Set up for configuration.

      Typically this step discovers configuration resources

      Specified by:
        `preConfigure` in interface `Configuration`
      Overrides:
        `preConfigure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`

    - #### configure

          public void configure(WebAppContext context)
                         throws Exception

      Description copied from interface: `Configuration`
      Configure WebApp.

      Typically this step applies the discovered configuration resources to either the `WebAppContext` or the associated `MetaData`.

      Specified by:
        `configure` in interface `Configuration`
      Overrides:
        `configure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`

    - #### postConfigure

          public void postConfigure(WebAppContext context)
                             throws Exception

      Description copied from interface: `Configuration`
      Clear down after configuration.
      Specified by:
        `postConfigure` in interface `Configuration`
      Overrides:
        `postConfigure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`

    - #### cloneConfigure

          public void cloneConfigure(WebAppContext template,
                            WebAppContext context)
                              throws Exception

      Description copied from interface: `Configuration`
      Clone configuration instance.

      Configure an instance of a WebAppContext, based on a template WebAppContext that has previously been configured by this Configuration.

      Specified by:
        `cloneConfigure` in interface `Configuration`
      Overrides:
        `cloneConfigure` in class `AbstractConfiguration`
      Parameters:
        `template` - The template context
        `context` - The context to configure
      Throws:
        `Exception`

    - #### deconfigure

          public void deconfigure(WebAppContext context)
                           throws Exception

      Description copied from interface: `Configuration`
      DeConfigure WebApp. This method is called to undo all configuration done. This is called to allow the context to work correctly over a stop/start cycle
      Specified by:
        `deconfigure` in interface `Configuration`
      Overrides:
        `deconfigure` in class `AbstractConfiguration`
      Parameters:
        `context` - The context to configure
      Throws:
        `Exception`

Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.