javax.servlet

Interface Registration

  • All Known Subinterfaces:
    FilterRegistration, FilterRegistration.Dynamic, Registration.Dynamic, ServletRegistration, ServletRegistration.Dynamic

    public interface Registration
    Interface through which a Servlet or Filter may be further configured.

    A Registration object whose getClassName() method returns null is considered preliminary. Servlets and Filters whose implementation class is container implementation specific may be declared without any servlet-class or filter-class elements, respectively, and will be represented as preliminary Registration objects. Preliminary registrations must be completed by calling one of the addServlet or addFilter methods on ServletContext, and passing in the Servlet or Filter name (obtained via getName()) along with the supporting Servlet or Filter implementation class name, Class object, or instance, respectively. In most cases, preliminary registrations will be completed by an appropriate, container-provided ServletContainerInitializer.

    Since:
    Servlet 3.0
    • Method Detail

      • getName

        String getName()
        Gets the name of the Servlet or Filter that is represented by this Registration.
        Returns:
        the name of the Servlet or Filter that is represented by this Registration
      • getClassName

        String getClassName()
        Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.
        Returns:
        the fully qualified class name of the Servlet or Filter that is represented by this Registration, or null if this Registration is preliminary
      • setInitParameter

        boolean setInitParameter(String name,
                                 String value)
        Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.
        Parameters:
        name - the initialization parameter name
        value - the initialization parameter value
        Returns:
        true if the update was successful, i.e., an initialization parameter with the given name did not already exist for the Servlet or Filter represented by this Registration, and false otherwise
        Throws:
        IllegalStateException - if the ServletContext from which this Registration was obtained has already been initialized
        IllegalArgumentException - if the given name or value is null
      • getInitParameter

        String getInitParameter(String name)
        Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object.
        Parameters:
        name - the name of the initialization parameter whose value is requested
        Returns:
        the value of the initialization parameter with the given name, or null if no initialization parameter with the given name exists
      • setInitParameters

        Set<String> setInitParameters(Map<String,String> initParameters)
        Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.

        The given map of initialization parameters is processed by-value, i.e., for each initialization parameter contained in the map, this method calls setInitParameter(String,String). If that method would return false for any of the initialization parameters in the given map, no updates will be performed, and false will be returned. Likewise, if the map contains an initialization parameter with a null name or value, no updates will be performed, and an IllegalArgumentException will be thrown.

        Parameters:
        initParameters - the initialization parameters
        Returns:
        the (possibly empty) Set of initialization parameter names that are in conflict
        Throws:
        IllegalStateException - if the ServletContext from which this Registration was obtained has already been initialized
        IllegalArgumentException - if the given map contains an initialization parameter with a null name or value
      • getInitParameters

        Map<String,String> getInitParameters()
        Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object.
        Returns:
        Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/servlet/Registration.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com, Registration (Java(TM) EE 7 Specification APIs)

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.