JSP and JavaBean Problem!!

I am trying to learn how to develop using JSPs. I have an example in a book using a JavaBean and a JSP. Here is the JSP:

<html>

<head><title>Calling Java Bean Methods</title></head>

<body>

<H1>Using Methods</H1>

<% JSP24Hours.Hour8.callingJavaBeanMethods cm2= new JSP24Hours.Hour8.callingJavaBeanMethods();

cm2.setStringVar("String Value 2");

cm2.setIntVar(234);

cm2.setDoubleVar(567.678);

%>

<UL>

<LI>cm2.getStringVar() = <%= cm2.getStringVar() %>

<LI>cm2.getIntVar() = <%= cm2.getIntVar() %>

<LI>cm2.getDoubleVar()= <%= cm2.getDoubleVar() %>

</UL>

</body>

</html>

The JavaBean it calls is:

package JSP24Hours.Hour8;

public class callingJavaBeanMethods {

String stringVar;

int intVar;

double doubleVar;

public callingJavaBeanMethods(){}

public void setStringVar(String s) {stringVar=s; }

public String getStringVar() { return stringVar; }

public void setIntVar(int i) {intVar=i; }

public int getIntVar() {return intVar; }

public void setDoubleVar(double d) {doubleVar=d; }

public double getDoubleVar() { return doubleVar; }

}

Very basic. I created this in Sun ONE Studio 4 and have both the Bean and JSP in the same folder. When I try to run the JSP (even after compiling/building the Bean), I get an Apache/Tomcat error -- java.lang.NoClassDefFoundError: JSP24Hours/Hour8/callingJavaBeanMethods

I have tried a few other Beans and JSPs, and get the same result. It looks like it would work fine. Can anyone with more expertise help me out on this one? Thanks!!

mhaddon@utah.gov

[1812 byte] By [MikeHaddon] at [2007-11-25 9:58:19]
# 1
Mike,I tried your code. Its working fine. I thing you have not mounted directory properly. You should mount parent directory of your package. HTHDeepak
deepak goyal at 2007-7-1 19:31:36 > top of Java-index,Development Tools,Java Tools...
# 2
Hi Mike,You may want to create a Web Module and Put the JSP under the WEB-INF directory and your javabean under the Classes directory and then try to execute it.That might fix it.ThanksKishore
Kishore Mandyam at 2007-7-1 19:31:36 > top of Java-index,Development Tools,Java Tools...