javax.servlet.jsp.jstl.core

Class Config


  • public class Config
    extends Object
    Class supporting access to configuration settings.
    • Field Detail

      • FMT_LOCALE

        public static final String FMT_LOCALE
        Name of configuration setting for application- (as opposed to browser-) based preferred locale
        See Also:
        Constant Field Values
      • FMT_FALLBACK_LOCALE

        public static final String FMT_FALLBACK_LOCALE
        Name of configuration setting for fallback locale
        See Also:
        Constant Field Values
      • FMT_LOCALIZATION_CONTEXT

        public static final String FMT_LOCALIZATION_CONTEXT
        Name of configuration setting for i18n localization context
        See Also:
        Constant Field Values
      • SQL_DATA_SOURCE

        public static final String SQL_DATA_SOURCE
        Name of configuration setting for SQL data source
        See Also:
        Constant Field Values
      • SQL_MAX_ROWS

        public static final String SQL_MAX_ROWS
        Name of configuration setting for maximum number of rows to be included in SQL query result
        See Also:
        Constant Field Values
    • Constructor Detail

      • Config

        public Config()
    • Method Detail

      • get

        public static Object get(PageContext pc,
                                 String name,
                                 int scope)
        Looks up a configuration variable in the given scope.

        The lookup of configuration variables is performed as if each scope had its own name space, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        pc - Page context in which the configuration variable is to be looked up
        name - Configuration variable name
        scope - Scope in which the configuration variable is to be looked up
        Returns:
        The java.lang.Object associated with the configuration variable, or null if it is not defined.
      • get

        public static Object get(ServletRequest request,
                                 String name)
        Looks up a configuration variable in the "request" scope.

        The lookup of configuration variables is performed as if each scope had its own name space, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        request - Request object in which the configuration variable is to be looked up
        name - Configuration variable name
        Returns:
        The java.lang.Object associated with the configuration variable, or null if it is not defined.
      • get

        public static Object get(HttpSession session,
                                 String name)
        Looks up a configuration variable in the "session" scope.

        The lookup of configuration variables is performed as if each scope had its own name space, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        session - Session object in which the configuration variable is to be looked up
        name - Configuration variable name
        Returns:
        The java.lang.Object associated with the configuration variable, or null if it is not defined, if session is null, or if the session is invalidated.
      • get

        public static Object get(ServletContext context,
                                 String name)
        Looks up a configuration variable in the "application" scope.

        The lookup of configuration variables is performed as if each scope had its own name space, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        context - Servlet context in which the configuration variable is to be looked up
        name - Configuration variable name
        Returns:
        The java.lang.Object associated with the configuration variable, or null if it is not defined.
      • set

        public static void set(PageContext pc,
                               String name,
                               Object value,
                               int scope)
        Sets the value of a configuration variable in the given scope.

        Setting the value of a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        pc - Page context in which the configuration variable is to be set
        name - Configuration variable name
        value - Configuration variable value
        scope - Scope in which the configuration variable is to be set
      • set

        public static void set(ServletRequest request,
                               String name,
                               Object value)
        Sets the value of a configuration variable in the "request" scope.

        Setting the value of a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        request - Request object in which the configuration variable is to be set
        name - Configuration variable name
        value - Configuration variable value
      • set

        public static void set(HttpSession session,
                               String name,
                               Object value)
        Sets the value of a configuration variable in the "session" scope.

        Setting the value of a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        session - Session object in which the configuration variable is to be set
        name - Configuration variable name
        value - Configuration variable value
      • set

        public static void set(ServletContext context,
                               String name,
                               Object value)
        Sets the value of a configuration variable in the "application" scope.

        Setting the value of a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not replace one stored in a different scope.

        Parameters:
        context - Servlet context in which the configuration variable is to be set
        name - Configuration variable name
        value - Configuration variable value
      • remove

        public static void remove(PageContext pc,
                                  String name,
                                  int scope)
        Removes a configuration variable from the given scope.

        Removing a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not impact one stored in a different scope.

        Parameters:
        pc - Page context from which the configuration variable is to be removed
        name - Configuration variable name
        scope - Scope from which the configuration variable is to be removed
      • remove

        public static void remove(ServletRequest request,
                                  String name)
        Removes a configuration variable from the "request" scope.

        Removing a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not impact one stored in a different scope.

        Parameters:
        request - Request object from which the configuration variable is to be removed
        name - Configuration variable name
      • remove

        public static void remove(HttpSession session,
                                  String name)
        Removes a configuration variable from the "session" scope.

        Removing a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not impact one stored in a different scope.

        Parameters:
        session - Session object from which the configuration variable is to be removed
        name - Configuration variable name
      • remove

        public static void remove(ServletContext context,
                                  String name)
        Removes a configuration variable from the "application" scope.

        Removing a configuration variable is performed as if each scope had its own namespace, that is, the same configuration variable name in one scope does not impact one stored in a different scope.

        Parameters:
        context - Servlet context from which the configuration variable is to be removed
        name - Configuration variable name
      • find

        public static Object find(PageContext pc,
                                  String name)
        Finds the value associated with a specific configuration setting identified by its context initialization parameter name.

        For each of the JSP scopes (page, request, session, application), get the value of the configuration variable identified by name using method get(). Return as soon as a non-null value is found. If no value is found, get the value of the context initialization parameter identified by name.

        Parameters:
        pc - Page context in which the configuration setting is to be searched
        name - Context initialization parameter name of the configuration setting
        Returns:
        The java.lang.Object associated with the configuration setting identified by name, or null if it is not defined.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/servlet/jsp/jstl/core/config.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.