Class ServletRegistrationBean<T extends javax.servlet.Servlet>

    • Method Detail

      • setServlet

        public void setServlet​(T servlet)
        Sets the servlet to be registered.
        Parameters:
        servlet - the servlet
      • getServlet

        public T getServlet()
        Return the servlet being registered.
        Returns:
        the servlet
      • setUrlMappings

        public void setUrlMappings​(Collection<String> urlMappings)
        Set the URL mappings for the servlet. If not specified the mapping will default to '/'. This will replace any previously specified mappings.
        Parameters:
        urlMappings - the mappings to set
        See Also:
        addUrlMappings(String...)
      • getUrlMappings

        public Collection<StringgetUrlMappings()
        Return a mutable collection of the URL mappings, as defined in the Servlet specification, for the servlet.
        Returns:
        the urlMappings
      • setLoadOnStartup

        public void setLoadOnStartup​(int loadOnStartup)
        Sets the loadOnStartup priority. See ServletRegistration.Dynamic.setLoadOnStartup(int) for details.
        Parameters:
        loadOnStartup - if load on startup is enabled
      • setMultipartConfig

        public void setMultipartConfig​(javax.servlet.MultipartConfigElement multipartConfig)
        Set the multi-part configuration.
        Parameters:
        multipartConfig - the multi-part configuration to set or null
      • getMultipartConfig

        public javax.servlet.MultipartConfigElement getMultipartConfig()
        Returns the multi-part configuration to be applied or null.
        Returns:
        the multipart config
      • configure

        protected void configure​(javax.servlet.ServletRegistration.Dynamic registration)
        Configure registration settings. Subclasses can override this method to perform additional configuration if required.
        Overrides:
        configure in class DynamicRegistrationBean<javax.servlet.ServletRegistration.Dynamic>
        Parameters:
        registration - the registration
      • getServletName

        public String getServletName()
        Returns the servlet name that will be registered.
        Returns:
        the servlet name