Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Beans

 
bruno martins
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i have a problem error
org.apache.jasper.JasperException: CounterBean
my code:
<%@ page import="com.bruno.CounterBean" %>
<jsp:useBean id="session_counter" class="CounterBean" scope="session" />
<jsp:useBean id="app_counter" class="CounterBean" scope="application" />
<%
session_counter.increaseCount();
synchronized(page) {
app_counter.increaseCount();
}
%>
<h3>
Number of accesses within this session:
<jsp:getProperty name="session_counter" property="count" />
</h3>
<p>
<h3>
Total number of accesses:
<% synchronized(page) { %>
<jsp:getProperty name="app_counter" property="count" />
<% } %>
</h3>
package com.bruno;
public class CounterBean {
int count;
public int getCount() {
return count;
}
public void increaseCount() {
count++;
}
}
[ December 09, 2003: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to specify the fully qualified class name of the bean. E.g.:

bear
[ December 09, 2003: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic