Help a Newbie PLZ: Accessing custom classes from servlet

From: Utter Newbie (
Date: 12/22/03

Date: Mon, 22 Dec 2003 10:57:44 -0700

I starting to learn about servlets (Book: Java for the web) and have
been using Resin as a servlet container. I'm trying to access a class
(StringUtil) from a servlet called Page2Servlet (which is compiled
successfully). StringUtil includes the:



I'm using this import statement in Page2Servlet and it compiled

The class StringUtil is located under:


All servlets are located in the classes directory.

Resin-3.0.4 is giving me the following error when I try to post from a
Servlet Page1Servlet to Page2Servlet:

500 Servlet Exception
java.lang.NoClassDefFoundError: com/brainysoftware/java/StringUtil
(wrong name: StringUtil)

Have I put the class in the wrong place? Should I include something in
myApp's web.xml file for the servlets to access the StringUtil class?
All I have now is some servlet definitions and:


Everything else is the defaults for Resin...

I thought Resin would pick the class up automagically but no luck.

I find the most frustrating part of learning servlets is the
configuration, not the actual coding... Sigh... Any help appreciated.