D
D影子D
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@ page import="bean.*"%>
<html><body>
<center>
<%
TestBean testBean=new TestBean("This is a test java bean.");
%>
Java bean name is: <%=testBean.getName()%>
</center></body></html>
这个正确,而下面的就不能使用bean,为什么?
<%@ page import="bean.*"%>
<html><body>
<jsp:useBean id="testBean" scope="application" class="TestBean" />
<center>
Java bean name is: <%=testBean.getName()%>
</center></body></html>