I
experienced the same problem. It's due to a class loader issue.
Multiple class loaders have been introduced in V4.0 to implement the
requirements found in Section 9.6.2 of the Servlet 2.3 Spec. These class
loaders are used to load all of the jars and classes rather than using the
CLASSPATH.
I was
able to resolve this problem as follows :
- Add all supporting jars for your web application (except J2EE
jars) to the /WEB-INF/lib directory rather than including them in the
CLASSPATH
- Add all of the required classes for your web application to the
/WEB-INF/classes directory rather than including them in the
CLASSPATH
- Add the j2ee.jar from the
/j2sdkee1.3/lib directory to the TOMCAT_HOME/common/lib directory.
All J2EE platform classes must be placed in the common/lib
or common/classes directories rather than with the web
application.
-Wells
Wells
Tiedeman
YOUcentric, Inc.
P: 704.401.1109
F: 704.401.1240
[EMAIL PROTECTED]
YOUcentric, Inc.
P: 704.401.1109
F: 704.401.1240
[EMAIL PROTECTED]
For
more information on YOUcentric, please visit our web site at
www.youcentric.com
www.youcentric.com
-----Original Message-----
From: Vernon Wu [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 7:53 PM
To: [EMAIL PROTECTED]
Subject: ServletException in 4.0b5I move one our small JSP application from 3.x to 4.0b5 for the reason of using servlet 2.3 specification: ServletContextListener, HttpSessionListener be more specific.I get the exception under the 4.0b5 with the following messages:Exception Report:
javax.servlet.ServletException: Class abc.control.ControllerServlet is not a Servlet ....Root Cause:
java.lang.ClassCastException: abc.control.ControllerServlet ...There is not any indication that anywhere my code is not approprt. What I shall do at this situation?I believe that I encounter the similar situation in the 3.x, and it can be resolved by recycle the Tomcat server. That method doesn't work for 4.0b5.Thanks.Vernon
Get your FREE download of MSN Explorer at http://explorer.msn.com