Class WebManager

java.lang.Object
org.zkoss.zk.ui.http.WebManager

public class WebManager extends Object
A bridge between Web server and ZK.

Each Web application that uses ZK will have an independent instance of WebManager.

Author:
tomyeh
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebManager(jakarta.servlet.ServletContext ctx, String updateURI)
    Creates the Web manager.
    WebManager(jakarta.servlet.ServletContext ctx, String updateURI, String resourceURI)
    Creates the Web manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    static final void
    addActivationListener(jakarta.servlet.ServletContext ctx, WebManagerActivationListener listener)
    Register a listener to the specified context such that it will be invoked if the corresponding WebManager is created.
    void
     
    final org.zkoss.web.util.resource.ClassWebResource
    Returns the handler to retrieve resource from class path, under /web.
    getDesktop(Session sess, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, String path, boolean autocreate)
    Returns the desktop of the specified request, or null if not found and autocreate is false, or it has been redirect or forward to other page.
    Returns the URI for ZK resource
    static final Session
    getSession(jakarta.servlet.ServletContext ctx, jakarta.servlet.http.HttpServletRequest request)
    Returns the session associated with the specified request request.
    static final Session
    getSession(jakarta.servlet.ServletContext ctx, jakarta.servlet.http.HttpServletRequest request, boolean create)
    Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session.
    Returns the URI for asynchronous update.
    final WebApp
    Returns the Web application.
    static final WebApp
    getWebApp(jakarta.servlet.ServletContext ctx)
    Returns the Web application of the specified context.
    static final WebApp
    getWebAppIfAny(jakarta.servlet.ServletContext ctx)
    Returns the Web application of the specified context, or null if not available.
    static final WebManager
    getWebManager(jakarta.servlet.ServletContext ctx)
    Returns the Web manager of the specified context.
    static final WebManager
    Returns the Web manager of the specified WebApp.
    static final WebManager
    getWebManagerIfAny(jakarta.servlet.ServletContext ctx)
    Returns the Web manager of the give context, or null if not found.
    static final WebManager
    Returns the Web manager of the specified WebApp, or null if not found.
    static Page
    newPage(UiFactory uf, RequestInfo ri, PageDefinition pagedef, jakarta.servlet.ServletResponse response, String path)
    Creates a page.
    static Page
    newPage(UiFactory uf, RequestInfo ri, Richlet richlet, jakarta.servlet.ServletResponse response, String path)
    Creates a page.
    static void
    setDesktop(jakarta.servlet.http.HttpServletRequest request, Desktop desktop)
    Sets the desktop to the specified request.

    Methods inherited from class java.lang.Object

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

    • WebManager

      public WebManager(jakarta.servlet.ServletContext ctx, String updateURI)
      Creates the Web manager. It is singleton in a Web application and it is created automatically by DHtmlLayoutServlet, so you rarely need to create it manually.
      Since:
      3.6.0
    • WebManager

      public WebManager(jakarta.servlet.ServletContext ctx, String updateURI, String resourceURI)
      Creates the Web manager. It is singleton in a Web application and it is created automatically by DHtmlLayoutServlet, so you rarely need to create it manually.
      Parameters:
      ctx - the servlet context
      updateURI - the URI for asynchronous update
      resourceURI - the URI for ZK resource.
      Since:
      9.5.0
  • Method Details