tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Unable to use a javabean in an jsp page
Date Fri, 28 Sep 2001 16:54:00 GMT
I am a new user to Tomcat and seem to be having a fundamental problem with
getting javabeans to work in a jsp page.  I have followed documentation to a
T, but still no resolve.  Anyways, here's the outline of my problem....

I created an application called "ch01" in the "webapps" directory on a
Windows 2000 platform.  Here is my directory hierarchy:


I have a jsp page in the "ch01" directory that called "test_javabean1.jsp"
that creates a javabean that is located in the classes directory called
"JavaBean1.class".  When I try to view the jsp page in a browser, I
repeating get an error message stating that "class org.apache.jsp.JavaBean1
not found".  I know that this jsp/javabean combination should work since it
works flawlessly on a jrun server.

The only thing I can think of is that my "ch01" application does not have a
web.xml page in the WEB-INF directory.  If this is the problem, is there a
template I can use?

Also, my JavaBean1 class source code is below, is there anything I'm missing
for Tomcat server?

Any help would be much appreciated!

Hoping to stand on the shoulders of geniuses, Rob.

JavaBean1 source code............

public class JavaBean1 {

  private String message = "<b>Wow!  Dale is a nerd!</b>";

  public JavaBean1() {

  public void setMessage(String a) {
    message = a;

  public String getMessage() {
    return message;

View raw message