Package org.zkoss.zk.au.http
Class AuRedirect
- java.lang.Object
-
- org.zkoss.zk.au.http.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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REDIRECT_URL_PARAMETER
static java.lang.String
URI_PREFIX
-
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
-
Methods inherited from interface org.zkoss.zk.au.http.AuExtension
charsetSetup
-
-
-
-
Field Detail
-
URI_PREFIX
public static final java.lang.String URI_PREFIX
- See Also:
- Constant Field Values
-
REDIRECT_URL_PARAMETER
public static final java.lang.String REDIRECT_URL_PARAMETER
- See Also:
- Constant Field Values
-
-
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 interfaceWebAppInit
- 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 toDHtmlUpdateServlet
.- Specified by:
init
in interfaceAuExtension
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
Description copied from interface:AuExtension
Destroys the AU extension. It is called when an extension is removed fromDHtmlUpdateServlet
, or whenDHtmlUpdateServlet
is being destroyed.- Specified by:
destroy
in interfaceAuExtension
-
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 interfaceAuExtension
- 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 (seeDHtmlUpdateServlet.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
-
-