org.apache.struts2.views.util

## Class ContextUtil

- java.lang.Object
- - org.apache.struts2.views.util.ContextUtil

-     public class ContextUtil
      extends Object

  Value Stack's Context related Utilities.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACTION`
    `static String` | `BASE`
    `static String` | `REQUEST`
    `static String` | `RESPONSE`
    `static String` | `SESSION`
    `static String` | `STACK`
    `static String` | `STRUTS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Map<String,Object>` | `getStandardContext(ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)`
    `static String` | `getTemplateSuffix(Map<String,Object> context)` Returns a String for overriding the default templateSuffix if templateSuffix is on the stack

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

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

- - ### Field Detail

    - #### REQUEST

          public static final String REQUEST

      See Also:
        Constant Field Values

    - #### RESPONSE

          public static final String RESPONSE

      See Also:
        Constant Field Values

    - #### SESSION

          public static final String SESSION

      See Also:
        Constant Field Values

    - #### BASE

          public static final String BASE

      See Also:
        Constant Field Values

    - #### STACK

          public static final String STACK

      See Also:
        Constant Field Values

    - #### STRUTS

          public static final String STRUTS

      See Also:
        Constant Field Values

    - #### ACTION

          public static final String ACTION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ContextUtil

          public ContextUtil()

  - ### Method Detail

    - #### getStandardContext

          public static Map<String,Object> getStandardContext(ValueStack stack,
                                                              javax.servlet.http.HttpServletRequest req,
                                                              javax.servlet.http.HttpServletResponse res)

    - #### getTemplateSuffix

          public static String getTemplateSuffix(Map<String,Object> context)

      Returns a String for overriding the default templateSuffix if templateSuffix is on the stack
      Parameters:
        `context` - stack's context
      Returns:
        String

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