org.apache.struts2.views

## Class DefaultTagLibrary

- java.lang.Object
- - org.apache.struts2.views.DefaultTagLibrary

- All Implemented Interfaces:
    TagLibraryDirectiveProvider, TagLibraryModelProvider

      public class DefaultTagLibrary
      extends Object
      implements TagLibraryDirectiveProvider, TagLibraryModelProvider

  The default Struts tag library

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTagLibrary()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Class>` | `getDirectiveClasses()` Gets a list of Velocity directive classes for the tag library.
    `Object` | `getFreemarkerModels(ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)`
    `Object` | `getModels(ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Gets a Java object that contains getters for the tag library's Freemarker models.
    `List<Class>` | `getVelocityDirectiveClasses()`

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

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

- - ### Constructor Detail

    - #### DefaultTagLibrary

          public DefaultTagLibrary()

  - ### Method Detail

    - #### getModels

          public Object getModels(ValueStack stack,
                         javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)

      Description copied from interface: `TagLibraryModelProvider`
      Gets a Java object that contains getters for the tag library's Freemarker models. Called once per Freemarker template processing.
      Specified by:
        `getModels` in interface `TagLibraryModelProvider`
      Parameters:
        `stack` - The current value stack
        `req` - The HTTP request
        `res` - The HTTP response
      Returns:
        The Java object containing the Freemarker model getter methods

    - #### getDirectiveClasses

          public List<Class> getDirectiveClasses()

      Description copied from interface: `TagLibraryDirectiveProvider`
      Gets a list of Velocity directive classes for the tag library. Called once on framework startup when initializing Velocity.
      Specified by:
        `getDirectiveClasses` in interface `TagLibraryDirectiveProvider`
      Returns:
        A list of Velocity directive classes

    - #### getFreemarkerModels

          public Object getFreemarkerModels(ValueStack stack,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)

    - #### getVelocityDirectiveClasses

          public List<Class> getVelocityDirectiveClasses()

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.