useBean谢谢
counter:
public class counter {	
	private int count=0;	
	public void setcount(int count){
		this.count=count;
	}
	public int getcount(){
		return ++count;
	}	
}
counter.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>con</title>
</head>
<body><br/>
<jsp:useBean id="personCount" class="counter" scope="session" />
<jsp:useBean id="totalCount" class="counter" scope="application" />
<jsp:getProperty name="personCount" property="count" />
</body>
</html>
HTTP Status 500 -  
--------------------------------------------
type Exception report
message  
description 
The server encountered an internal error () that prevented it from fulfilling this request.exception  
org.apache.jasper.JasperException: Unable to compile class for JSP:  
An error occurred at line: 7 in the jsp file: /counter.jsp
counter 
cannot be resolved to a type
4: <title>con</title>
5: </head>
6: <body><br/>
7: <jsp:useBean id="personCount" class="counter" scope="session" />
8: <jsp:useBean id="totalCount" class="counter" scope="application" />
9:  
10: <jsp:getProperty name="personCount" property="count" />
An error occurred at line: 7 in the jsp file: /counter.jsp
counter cannot be resolved to a type
4: <title>con</title>
5: </head>
6: <body><br/>
7: <jsp:useBean id="personCount" class="counter" scope="session" />
8: <jsp:useBean id="totalCount" class="counter" scope="application" />
9:  
10: <jsp:getProperty name="personCount" property="count" />
An error occurred at line: 7 in the jsp file: /counter.jsp
counter cannot be resolved to a type
4: <title>con</title>
5: </head>
6: <body><br/>
7: <jsp:useBean id="personCount" class="counter" scope="session" />
8: <jsp:useBean id="totalCount" class="counter" scope="application" />
9:  
10: <jsp:getProperty name="personCount" property="count" />
An error occurred at line: 8 in the jsp file: /counter.jsp
counter cannot be resolved to a type
5: </head>
6: <body><br/>
7: <jsp:useBean id="personCount" class="counter" scope="session" />
8: <jsp:useBean id="totalCount" class="counter" scope="application" />
9:  
10: <jsp:getProperty name="personCount" property="count" />
11:  
An error occurred at line: 8 in the jsp file: /counter.jsp
counter cannot be resolved to a type
5: </head>
6: <body><br/>
7: <jsp:useBean id="personCount" class="counter" scope="session" />
8: <jsp:useBean id="totalCount" class="counter" scope="application" />
9:  
10: <jsp:getProperty