I created a servlet that sets attribute in request scope as an instance of java bean class. My bean is named Person created directly under WEB-INF/classes folder. I have not used package foo as done in HFSJ.
After setting attribute, I have forwarded to a jsp page via requestdispatcher.
This is not working in jsp page -
<p> Hello::: </p> <% Person p=(Person)request.getAttribute("Person"); %> <%= p.getName()%> <br><br>
It says :: Compiling 1 source file [javac] C:\apache-tomcat-4.1.37\apache-tomcat-4.1.37\work\Standalone\localhost\testJSP\Tester_jsp.java:42: cannot resolve symbol [javac] symbol : class Person [javac] location: class org.apache.jsp.Tester_jsp [javac] Person p=(Person)request.getAttribute("Person");
Please guide. Is it important to use package for bean class. If yes then why so.