04-02-04 richardcheng

以下是我的.java file,还有相应的directory


The directory of Apache(V2.0.48) is:

D:\Program Files\Apache Group\Apache2

The directory of Tomcat(V5.0) is:

D:\Program Files\Apache Software Foundation\Tomcat 5.0

Apache and Tomcat are the default directory


The directory of webdoc is:



E:\websrv\myweb(root)----\jsp\test.jsp /---SimpleBean.java



Below is my .jsp file(inside \jsp)

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>



<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>test Bena</title>



<jsp:useBean id="test" class="hall.SimpleBean"/>

<jsp:setProperty name="test"


value="Hello WWW" />




Below is my .java file(inside \WEB-INF\classes\)

package hall;

public class SimpleBean {

private String message = "No message specified";

public String getMessage() {



public void setMessage(String message) {

this.message = message;




下是部份error message

An error occurred at line: 10 in the jsp file: /useBean.jsp

Generated servlet error:

[javac] Compiling 1 source file

D:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\jsp\org\apache\jsp\useBean_jsp.java:42: package hall does not exist

hall.SimpleBean test = null;


thank you very much