bean代码
public class hello{
public String getString(){
return "Hello Jack!";
}
}
jsp代码
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="hi" class="hello" scope="page"></jsp:useBean>
<%=hi.getString() %>
</body>
</html>其中的class="hello" 提示为hello无法解析为类型
我的平台是 eclipse+myclipse+tomact
其中 hello.class 放在WEB-INF的classes下
高人指教呀 想死了..............
不会是配置的有问题吧
public class hello{
public String getString(){
return "Hello Jack!";
}
}
jsp代码
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="hi" class="hello" scope="page"></jsp:useBean>
<%=hi.getString() %>
</body>
</html>其中的class="hello" 提示为hello无法解析为类型
我的平台是 eclipse+myclipse+tomact
其中 hello.class 放在WEB-INF的classes下
高人指教呀 想死了..............
不会是配置的有问题吧
加上package 包名;
然后在<jsp:useBean id="hi" class="hello" scope="page"></jsp:useBean>
将class="hello"变成class="包名.hello"