• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a Bean from JSP page in Tomcat 4.0

 
shawn kennedy
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp page and a bean name "Hello" and deployed the bean class to the web-inf/classes directory and tried accessing it from the jsp page using the <jsp:useBean id=test class=Hello>but when i access my jsp page from the browser it gives me an error saying that the class.org.apache.jsp.Hello not found.
It also says Hello test = null.
Can anyone please help ?
Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Place your bean in a package other than the default.
 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you just create another folder in classess and delpoy your bean over there
eg.>web-inf>classess>Temp>Hello.class
and called them as <jsp:useBean id="Test" class="Temp.Hello"/>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!