我用的是jdk1.4,tomcat4.1;
jsp文件放在  C:\tomcat\webapps\ROOT\myapp\test
目录下;
<%@page contentType="text/html,charset=gb2312"%>
<HTML>
<HEAD>
<TITLE> JavaBean试验</TITLE>
</HEAD>
<BODY>
<jsp:useBean id="hellobean" scope="application" class="test.helloworld"/>
<%=hellobean.getHi()%>
<hr>
<%
  hellobean.name="JSP";
out.print(hellobean.getHi());
%>

</BODY>
</HTML>

java 文件编译后放在
C:\tomcat\webapps\ROOT\myapp\WEB-INF\classes\test