|
javaBeans with JSP
Hello everyone..
i have one problem..
i want to use javaBeans with JSP in JBuilder(Eclipse) IDE.
i hv one JSP named :
'BeanJsp.jsp' with code :
<jsp:useBean id="the" class="CalcBean"/>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
int i = 4;
int j = the.doubleIt(i);
out.print("2*4=" + j);
%>
</BODY>
</HTML>
and one JavaBean named:
'CalcBean.java' with code :
public class CalcBean {
CalcBean(){ }
public int doubleIt(int number) {
return 2 * number;
}
}
while running on Tomcat 5.5 server it is giving error:
"org.apache.jasper.JasperException: /BeanJsp.jsp(2,0) The value for the useBean class attribute CalcBean is invalid."
this problem is only with JBuilder IDE..on Gel IDE it is working..
pls solve my problem n do reply soon...
Thanx.
:: pankaj
Last edited by jainpankaj15m : 07-25-2007 at 02:01 PM.
|