• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

errors running -Head First Servlets and JSP- example beerStruts

 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying out the example beerStruts app downloaded from the book site at
http://www.wickedlysmart.com/HeadFirst/HeadFirstServlets/HeadFirstJavaServlets.html
But I'm getting errors like
--
message Servlet FrontController is not available

description The requested resource (Servlet FrontController is not available) is not available.
--
and in my logs
--
15-Feb-2009 11:38:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet FrontController as unavailable
15-Feb-2009 11:38:16 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /beerStruts threw load() exception
java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap



I am using tomcat 6 (latest), java 6, and struts 1.1

Any ideas way?
The struts.jar manifest file has references to :
Class-Path: commons-beanutils.jar commons-collections.jar commons-dig
ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar s
truts-legacy.jar

do i need to get these jar files separately?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes--you are responsible for having the necessary libraries.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't find a version of jakarta-oro.jar earlier than 2, anyone know where i can find version 1?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered actually downloading Struts itself?

I'm not entirely sure why you're trying to use Struts 1.1--that is a *very* old version of Struts. Unless you have a compelling reason to use it I wouldn't, and there are a million other sample apps out there. The book itself is also pretty out-of-date (although quite good).

If you're dead-set on using Struts 1.1 (~7 years old):

http://archive.apache.org/dist/struts/struts-1.1/

It includes all of the required libraries.

Again, I don't recommend it unless you have a compelling reason.
 
Cal Gacus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David, I got it now.

The example programs did not contain all the jars needed, and there were no instructions in them to help find what was missing or even warn of the problem.
I wonder why they didn't include all the jars in the example program, could have saved me a lot of time. Neither the example program for the 1st or 2nd edition of the book had all that was required. I had to add the commons-logging104.jar to the apps lib directory for the 2nd ed example to work.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So send them an email.

Again--the (old, old, old) Struts 1.1 download *does* contain all the required libraries, including the ancient version of ORO.

My statement still stands, however--unless you have a good reason to use an antiquated version of Struts, I wouldn't.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic