Class RedirectToServletXServletHandler

    • Constructor Detail

      • RedirectToServletXServletHandler

        public RedirectToServletXServletHandler​(@Nonnull @Nonempty
                                                String sServletPath)
        Constructor.
        Parameters:
        sServletPath - The servlet path (relative to the current context) to redirect to. Must start with a slash ("/").
    • Method Detail

      • getServletPath

        @Nonnull
        @Nonempty
        public final String getServletPath()
        Returns:
        The servlet path as provided in the constructor. Always starts with a slash. Neither null nor empty.
        Since:
        9.3.1
      • handleRequest

        public void handleRequest​(@Nonnull
                                  com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope,
                                  @Nonnull
                                  com.helger.servlet.response.UnifiedResponse aUnifiedResponse)
                           throws Exception
        Description copied from interface: IXServletSimpleHandler
        This is the main request handling method. Overwrite this method to fill your HTTP response.
        Specified by:
        handleRequest in interface IXServletSimpleHandler
        Parameters:
        aRequestScope - The request scope to use. There is no direct access to the HttpServletResponse. Everything must be handled with the unified response! Never null.
        aUnifiedResponse - The response object to be filled. Never null.
        Throws:
        Exception - In case of an error