Package org.zkoss.zk.au.http
Class AuRedirect
java.lang.Object
org.zkoss.zk.au.http.AuRedirect
- All Implemented Interfaces:
AuExtension,WebAppInit
The AU processor to handle the HTTP redirect via status 302.
- Since:
- 7.0.0
- Author:
- Vincent, Robert Wenzel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys the AU extension.voidinit(DHtmlUpdateServlet servlet) Initializes the AU extension.voidCalled when a ZK application is created and initialized.voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, 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, waitMethods inherited from interface org.zkoss.zk.au.http.AuExtension
charsetSetup
-
Field Details
-
URI_PREFIX
- See Also:
-
REDIRECT_URL_PARAMETER
- See Also:
-
-
Constructor Details
-
AuRedirect
public AuRedirect()
-
-
Method Details
-
init
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:
Exception
-
init
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, String pi) throws jakarta.servlet.ServletException, IOException Description 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.ServletExceptionIOException
-