Well i have putted bean class in the web-inf\classes folder
and page.jsp in c:\tomcat\webapps\examples
but still it is giving error.Please tell i have spend a lot of time but i can't get.
Page.jsp:
<html>
<head><title>Page Directive</title></head>
<body>
<%@page language="java"%>
<
jsp:useBean id="name" scope="page" class="TestBean"/>
</body>
</html>
import java.beans.*;
public class TestBean
{
private int val;
public void set(int i){
this.val=i;
}
public int get(){
return val;
}
}
Giving following error..
:\tomcat4\work\localhost\examples\Page$jsp.java:64: Class org.apache.jsp.TestBean not found.
TestBean name = null;
^
An error occurred at line: 6 in the jsp file: /Page.jsp
Generated
servlet error:
C:\tomcat4\work\localhost\examples\Page$jsp.java:67: Class org.apache.jsp.TestBean not found.
name= (TestBean)
^
An error occurred at line: 6 in the jsp file: /Page.jsp
Generated servlet error:
C:\tomcat4\work\localhost\examples\Page$jsp.java:72: Class org.apache.jsp.TestBean not found.
name = (TestBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "TestBean");
^