<%@ page language="java"%>
<jsp:useBean id="testBean" scope="session"
class="trial.TestBean"/>
<jsp:setProperty name="testBean"
property="height" value="15"/>
<html>
<head>
<title>Simple JSP
Example</title>
</head>
<body>
<p>
<% for(int i=0;i<5;i++)
{
%>
Hello World !!<br>
<% }
%>
This is my first bean example :
<jsp:getProperty name="testBean"
property="height"/>
</p>
</body>
</html>
I have written a TestBean class with package
declaration as "trial" and put this class in
/my_application_home/web-inf/classes/trial/TestBean.class
When I startup Tomcat and I access my
applications other .jsp pages which donot access beans, they work
fine...
but when I access the above bean, it says,
java.lang.ClassNotFoundException : trial.TestBean not found.
Now here is the climax....when I put this
"trial" directory in tomcat_home/common/classes/
the bean is found and the jsp executes
perfectly....
why is it so??
I want to start development on a small
project and cant find a way to solve this problem....
Please would u help me?
Thanks & Best Regards,