Mark Davidson wrote:

> Did I miss a configuration step somewhere?
>
> Wait a second... earlier today, I e-mailed the list with a similar problem
> (I couldn't get the Struts' examples to work).  The struts-example wouldn't
> work under Resin or Tomcat because it couldn't find the
> org.apache.struts.example.User class.  It also couldn't find the properties
> file for the application (in the same directory).
>
> So, I did discover that if you let Tomcat unpack the .war file, stop Tomcat,
> edit your classpath to include the classes directory that just got unpacked
> and then restart Tomcat, the problems go away.
>
> My question to the list is... WHY?  It's *can't* be that you're supposed to
> do things this way.  I must have missed a configuration step, but for the
> life of me, I can't see it.  I find it difficult to believe that you have to
> point your CLASSPATH to the unpacked .war file in order to get Struts to
> work.
>
> If someone can tell me the *right* way to do this, I'd greatly appreciate
> it!
>

The "correct" approach to installing Struts apps on Tomcat is:

* Put "struts-example.war" (or whatever) in your webapps directory
* If this is an update to a previous webapp, delete the old expanded
  directory
* Ensure that there is no copy of "struts.jar" on your CLASSPATH
  (or in the $JAVA_HOME/jre/lib/ext directory)
* Restart Tomcat

The only other caveat is if you are using Tomcat 3.1 -- if you are, you are very
very strongly encouraged to upgrade to at least 3.2.1.  Tomcat 3.1 has tons of
bugs in the way it handles JSP custom tags, and is not a suitable platform for
developing or deploying Struts based applications.

>
> Mark
>

Craig McClanahan


>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, February 11, 2001 9:25 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: struts:example
> >
> >
> >
> >
> > These are the classes used by the struts example.So you
> > should include these
> > classes in your classpath.For ex. If this class file is within the
> > web-inf/classes directory then include int web-inf/classes
> > directory in the
> > classpath before starting the server.It works perfectly with
> > the tomcat server.
> >
> > hope it helps u,
> > gitanjali.
> >
> >

Reply via email to