struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Cabanes <k...@outermedia.de>
Subject Subclassing ActionServlet
Date Thu, 05 Oct 2000 14:37:19 GMT
Hi all,

   I'm developing a web application using struts and I've found the
following problem:

   I want to do some initializations when the servlet is loaded, so that
I've subclassed the org.apache.struts.action.ActionServlet class and
overriden the method init. In the overriden method a call to the
original init method is done (doing a super()) so that it mustn't be a
problem.

   The problem cames when, for initiating tomcat I need to put into the
CLASSPATH the struts.jar, otherwise I get a NoClassDefFoundException for
org/apache/struts/action/ActionServlet.

   I've done that, and apparently all is working nice, but in fact I've
noticed that struts is showing an strange behaviour (forms are not
working properly, the examples apps have left to work dued to
NoClassDefFoundExceptions, etc) and I've discovered that the strange
behaviour disappears if I don't put the struts.jar in the CLASSPATH, but
then I can't load the application that I am developing (I get the error
mentioned above).

   I've tried this with struts 0.5 and an older version, tomcat 3.1, and
JDK 1.2.2 and 1.3 for Linux, always with the same behaviour.

   Has someone subclassed ActionServlet successfully? I'm doing
something wrong?

   Thanx in advance,
   Jose R. Cabanes
   Web-app engineer.
   Outermedia.

Mime
View raw message