File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Running struts under tomcat 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Running struts under tomcat 5" Watch "Running struts under tomcat 5" New topic

Running struts under tomcat 5

Nik Karasev

Joined: Oct 18, 2004
Posts: 4
struts version 1.2.4 (latest)
Tomcat version 5.0.28
Windows XP

When file struts-examples.war (or struts-blank.war or whatever)
is put into webapps directory - the subdirectory struts-examples
gets created, however, this application is not available
and this is what LOG file says:

Oct 18, 2004 4:49:10 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /struts-examples from URL file :/Tomcat5.0/webapps/struts-examples
Oct 18, 2004 4:49:10 PM org.apache.catalina.startup.HostConfig deployWARs
SEVERE: Exception while expanding web application archive struts-examples.war
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
........... end snippet .............

All system variables are defined (CATALINA_HOME and JAVA_HOME).

Are there any special configurations required for tomcat or struts?

Nik Karasev

Joined: Oct 18, 2004
Posts: 4
Ok, I have to back off - it was all my fault - I put some *.jar
files (from struts distribution) into JAVA_HOME\jre\lib\ext
thinking it will let me avoid having struts files in every web-app.
I was wrong. After removing un-needed stuff from extention directory
all worked like a charm.

I agree. Here's the link:
subject: Running struts under tomcat 5
It's not a secret anymore!