Class AuRedirect

  • All Implemented Interfaces:
    AuExtension, WebAppInit

    public class AuRedirect
    extends java.lang.Object
    implements AuExtension, WebAppInit
    The AU processor to handle the HTTP redirect via status 302.
    Since:
    7.0.0
    Author:
    Vincent, Robert Wenzel
    • Constructor Summary

      Constructors 
      Constructor Description
      AuRedirect()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      Destroys the AU extension.
      void init​(DHtmlUpdateServlet servlet)
      Initializes the AU extension.
      void init​(WebApp wapp)
      Called when a ZK application is created and initialized.
      void service​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi)
      Called by ZK to process the AU request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AuRedirect

        public AuRedirect()
    • Method Detail

      • init

        public void init​(WebApp wapp)
                  throws java.lang.Exception
        Description copied from interface: WebAppInit
        Called when a ZK application is created and initialized.

        You could retrieve the servlet context by WebApp.getServletContext()

        Specified by:
        init in interface WebAppInit
        Throws:
        java.lang.Exception
      • init

        public void init​(DHtmlUpdateServlet servlet)
                  throws javax.servlet.ServletException
        Description copied from interface: AuExtension
        Initializes the AU extension. It is called when an extension is added to DHtmlUpdateServlet.
        Specified by:
        init in interface AuExtension
        Throws:
        javax.servlet.ServletException
      • service

        public void service​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            java.lang.String pi)
                     throws javax.servlet.ServletException,
                            java.io.IOException
        Description copied from interface: AuExtension
        Called by ZK to process the AU request.

        To retrieve the http session, use HttpServletRequest.getSession(). To retrieve the ZK session, use Sessions.getCurrent(boolean).

        Specified by:
        service in interface AuExtension
        Parameters:
        request - the request (never null).
        response - the response (never null).
        pi - the path info. It includes the prefix when the Au processor is associated (see DHtmlUpdateServlet.addAuExtension(org.zkoss.zk.ui.WebApp, java.lang.String, org.zkoss.zk.au.http.AuExtension). For example, if an AU processor is associated with "/upload", then pi must start with "/upload". Note: it might end with other string depending on the URI you generated to the client.
        Throws:
        javax.servlet.ServletException
        java.io.IOException