javabean问题
zhe5d 2004-08-29 09:56:08 jsp页面是:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test</title>
</head>
<body>
<jsp:useBean id="helloBean" scope="session" class="test.hello"/>
<%=helloBean.getHi()%>
<hr>
<%
helloBean.name="JSP";
out.print(helloBean.getHi());
%>
</body>
</html>
javabean是:
package test;
public class hello
{
public String name="My first bean";
public String getHi()
{
return "hello from"+name;
}
}
我使用的是resin。
问题是,提示/test.jsp was not found on this server.