tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huy.ngu...@redspark.com
Subject servlet unavailable
Date Fri, 20 Apr 2001 20:19:09 GMT
Hi everyone,

I am currently running Tomcat 4.0 on Win2K.  I just wrote a servlet name ReplaceWebdavServlet.java
to handle the request/response for my tasks.  It did compile and put this file in a jar and
then copy this file over to tomcat/server/lib.  I then went to the web.xml from WEB-INF and
changed the servlet-name from org.apache.catalina.servlets.WebdavServlet to com.mod.mwebdav.ReplaceWebdavServlet.
 I then started the Tomcat.  Now, whenever I tried to connect to the server as a webfolder,
I got an error message saying that the server is not responded.  I then checked out the log
file and I saw the message saying:

2001-04-20 13:13:21 StandardHost[localhost]: Installing web application at context path /webdav
from URL file:D:\tomcat\webapps\webdav
2001-04-20 13:13:21 Manager[/webdav]: Seeding random number generator class java.security.SecureRandom
2001-04-20 13:13:21 Manager[/webdav]: Seeding of random number generator has been completed
2001-04-20 13:13:21 ContextConfig[/webdav]: Configured an authenticator for method BASIC
2001-04-20 13:13:21 StandardWrapper[/webdav:default]: Loading container servlet default
2001-04-20 13:13:21 default: init
2001-04-20 13:13:22 StandardWrapper[/webdav:webdav]: Marking servlet webdav as unavailable
2001-04-20 13:13:22 StandardContext[/webdav]: Servlet /webdav threw load() exception
javax.servlet.ServletException: Class com.mod.mwebdav.ReplaceWebdavServlet is not a Servlet
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:790)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java, Compiled Code)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:721)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:388)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:616)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java, Compiled Code)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:383)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:226)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java, Compiled
Code)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java, Compiled Code)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java, Compiled Code)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:253)
	at org.apache.catalina.core.StandardService.start(StandardService.java, Compiled Code)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java, Compiled Code)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:707)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:627)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)
----- Root Cause -----
java.lang.ClassCastException: com.mod.mwebdav.ReplaceWebdavServlet
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:787)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java, Compiled Code)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:721)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:388)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:616)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java, Compiled Code)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:383)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:226)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java, Compiled
Code)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java, Compiled Code)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java, Compiled Code)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:253)
	at org.apache.catalina.core.StandardService.start(StandardService.java, Compiled Code)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java, Compiled Code)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:707)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:627)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)

2001-04-20 13:13:22 StandardContext[/webdav]: Context startup failed due to previous errors

Do you have any idea of what is wrong?  Is it because I did not register my servlet correctly?
 If so, what should I do?  Here is my configuration for my web.xml:

<servlet>
    <servlet-name>webdav</servlet-name>
    <!-- servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class
-->
    <servlet-class>com.mod.mwebdav.ReplaceWebdavServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>listings</param-name>
      <param-value>true</param-value>
    </init-param>
    <!-- Uncomment this to enable read and write access -->
<!--
    <init-param>
      <param-name>readonly</param-name>
      <param-value>false</param-value>
    </init-param>
-->
    <load-on-startup>1</load-on-startup>
  </servlet>

Thanks in advance.

Huy-

Mime
View raw message