javax.servlet

Interface ServletRegistration.Dynamic

    • Method Detail

      • setLoadOnStartup

        void setLoadOnStartup(int loadOnStartup)
        Sets the loadOnStartup priority on the Servlet represented by this dynamic ServletRegistration.

        A loadOnStartup value of greater than or equal to zero indicates to the container the initialization priority of the Servlet. In this case, the container must instantiate and initialize the Servlet during the initialization phase of the ServletContext, that is, after it has invoked all of the ServletContextListener objects configured for the ServletContext at their ServletContextListener.contextInitialized(javax.servlet.ServletContextEvent) method.

        If loadOnStartup is a negative integer, the container is free to instantiate and initialize the Servlet lazily.

        The default value for loadOnStartup is -1.

        A call to this method overrides any previous setting.

        Parameters:
        loadOnStartup - the initialization priority of the Servlet
        Throws:
        IllegalStateException - if the ServletContext from which this ServletRegistration was obtained has already been initialized
      • setServletSecurity

        Set<String> setServletSecurity(ServletSecurityElement constraint)
        Sets the ServletSecurityElement to be applied to the mappings defined for this ServletRegistration.

        This method applies to all mappings added to this ServletRegistration up until the point that the ServletContext from which it was obtained has been initialized.

        If a URL pattern of this ServletRegistration is an exact target of a security-constraint that was established via the portable deployment descriptor, then this method does not change the security-constraint for that pattern, and the pattern will be included in the return value.

        If a URL pattern of this ServletRegistration is an exact target of a security constraint that was established via the ServletSecurity annotation or a previous call to this method, then this method replaces the security constraint for that pattern.

        If a URL pattern of this ServletRegistration is neither the exact target of a security constraint that was established via the ServletSecurity annotation or a previous call to this method, nor the exact target of a security-constraint in the portable deployment descriptor, then this method establishes the security constraint for that pattern from the argument ServletSecurityElement.

        Parameters:
        constraint - the ServletSecurityElement to be applied to the patterns mapped to this ServletRegistration
        Returns:
        the (possibly empty) Set of URL patterns that were already the exact target of a security-constraint that was established via the portable deployment descriptor. This method has no effect on the patterns included in the returned set
        Throws:
        IllegalArgumentException - if constraint is null
        IllegalStateException - if the ServletContext from which this ServletRegistration was obtained has already been initialized
      • setRunAsRole

        void setRunAsRole(String roleName)
        Sets the name of the runAs role for this ServletRegistration.
        Parameters:
        roleName - the name of the runAs role
        Throws:
        IllegalArgumentException - if roleName is null
        IllegalStateException - if the ServletContext from which this ServletRegistration was obtained has already been initialized

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/ServletRegistration.Dynamic.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, ServletRegistration.Dynamic (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.