How run beans inTomcat

My Tomcat Server doesn't recognize my bean classes.It show the error message:The value for the useBean class attribute CounterBean is invalid..Do i need install something?

the jsp arquive:

<%@ page import="com.jguru.CounterBean" %>

<jsp:useBean id="session_counter" class="com.jguru.CounterBean" scope="session" />

<jsp:useBean id="app_counter" class="com.jguru.CounterBean" scope="application" />

the bean classse code:

package com.jguru;

public class CounterBean {

//declare a integer for the counter

int count;

public void setCount(int c){

count = c;

}

public int getCount() {

return count;

}

public void increaseCount() {

count++;

}

}

[786 byte] By [Dan2006a] at [2007-10-3 4:52:32]
# 1
HI,Please add a constructor to you bean and see if thetomcat can recognise bean..Add the following in your code.public <your classname>{}
sriarumillia at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...
# 2

> Add the following in your code.

>

> public <your classname>{

> }

===================================

sriarumilli your creating one empty constructor in bean know that is correc thing. because each and every bean should be having one empty constructor then only it will work....

ggopia at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...
# 3
sriarumilli Hi If you signin please replay for this message.....
ggopia at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...
# 4

> sriarumilli your creating one empty constructor in

> bean know that is correc thing. because each and

> every bean should be having one empty constructor

> then only it will work....

Ggopi, you ignorant twit, he already has an empty constructor.

By not creating any constructor, Java creates one implicitly for him.

Please refrain from answering questions, as you know diddly squat yourself, K?

warnerjaa at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...
# 5

> > sriarumilli your creating one empty constructor in

> > bean know that is correc thing. because each and

> > every bean should be having one empty constructor

> > then only it will work....

>

> Ggopi, you ignorant twit, he already has an empty

> constructor.

> By not creating any constructor, Java creates one

> implicitly for him.

>

> Please refrain from answering questions, as you know

> diddly squat yourself, K?

================================================

I think your not having eyes? You just this the program what he was sent. In that program there is no empty constructor..OK

> By not creating any constructor, Java creates one

> implicitly for him.

Ok your answer is correct. But if you go to the bean it is not like that? You should create one empty constructor then only it will work..K

ggopia at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...
# 6
Try the following forum (about JSP technology) http://forum.java.sun.com/forum.jspa?forumID=45
UncleSAMa at 2007-7-14 22:57:20 > top of Java-index,Desktop,Developing for the Desktop...