Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2541

Attempt to install CometAsyncServlet in Servlet 2.5 compliant container

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.7, 7.0.3
    • Fix Version/s: 6.5.8, 7.0.5
    • Component/s: None
    • Security Level: Jimmy
    • Environment:

      JBoss 5.1.0

      Description

      Problem Description:

      CometAsyncServlet is installed if the web container is determined as servlet 3.0 compliant. It is done by checking if javax.servlet.annotation.WebServlet can be loaded.

      If servlet-api-3.0.jar were put into WEB-INF/lib manually, or via Maven, this mechanism could break even if the web container is only servlet 2.5 compliant.

      Suggested Approach:

      ServletContext API has methods getMajorVersion() and getMinorVersion(), which checks Servlet API version.

      http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getMajorVersion()

      Stack Trace:

      java.lang.AbstractMethodError: org.apache.catalina.core.ApplicationContextFacade.addServlet(Ljava/lang/String;Ljava/lang/Class;)Ljavax/servlet/ServletRegistration$Dynamic;
      at org.zkoss.zkmax.ui.comet.CometAsyncServlet.install(CometAsyncServlet.java:54)
      at org.zkoss.zkmax.init.WebAppInit.init(WebAppInit.java:32)
      at org.zkoss.zk.ui.util.Configuration.invokeWebAppInits(Configuration.java:728)
      at org.zkoss.zk.ui.impl.AbstractWebApp.init(AbstractWebApp.java:202)
      at org.zkoss.zk.ui.http.SimpleWebApp.init(SimpleWebApp.java:58)
      at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:226)
      at org.zkoss.zk.ui.http.HttpSessionListener23.contextInitialized(HttpSessionListener23.java:140)
      ... omitted

        Attachments

          Activity

            People

            Assignee:
            hanhsu hanhsu
            Reporter:
            neillee neillee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: