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.StringREDIRECT_URL_PARAMETERstatic java.lang.StringURI_PREFIX
-
Constructor Summary
Constructors Constructor Description AuRedirect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys the AU extension.voidinit(DHtmlUpdateServlet servlet)Initializes the AU extension.voidinit(WebApp wapp)Called when a ZK application is created and initialized.voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.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:WebAppInitCalled when a ZK application is created and initialized.You could retrieve the servlet context by
WebApp.getServletContext()- Specified by:
initin interfaceWebAppInit- Throws:
java.lang.Exception
-
init
public void init(DHtmlUpdateServlet servlet) throws jakarta.servlet.ServletException
Description copied from interface:AuExtensionInitializes the AU extension. It is called when an extension is added toDHtmlUpdateServlet.- Specified by:
initin interfaceAuExtension- Throws:
jakarta.servlet.ServletException
-
destroy
public void destroy()
Description copied from interface:AuExtensionDestroys the AU extension. It is called when an extension is removed fromDHtmlUpdateServlet, or whenDHtmlUpdateServletis being destroyed.- Specified by:
destroyin interfaceAuExtension
-
service
public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, java.lang.String pi) throws jakarta.servlet.ServletException, java.io.IOExceptionDescription copied from interface:AuExtensionCalled 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:
servicein 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:
jakarta.servlet.ServletExceptionjava.io.IOException
-
-