• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with using a bean in JSP [Solved]

 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a sample bean called CarBean.java and is compiled to CarBean.class file. I have put the class file at /root/web-inf/classes
CarBean.java code...


I have a jsp file carBean.jsp at root/forums and the code is...


The generated servlet gives this following error which i could not make up...I think it basically reports that it is not able to find CarBean class.

[ January 03, 2006: Message edited by: Raghavan Chockalingam ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put your beans in a package for JVMs version 1.4.0 and up.
http://faq.javaranch.com/view?BeansNotFound
[ January 02, 2006: Message edited by: Ben Souther ]
 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done what you said, I put the bean in to a package and now it works....thanks...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad it's working.
Thank you for posting back.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!