Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

usebean tag gives problems while instantiating bean

 
AMIT GO
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi every one
can some pl help me
i am using tomacat and using <jsp:useBean id="hello" class="MyBean" />
in my index.jsp page located at webapps/beaninjsp directory
MyBean class is located at
webapps/beaninjsp/WEB-INF/classes/MyBean

when i give foll url
http://localhost:8080/beaninjsp/index.jsp

error ocurs
browser says
usebean action class property has invalid class MyBean

do i hv to configur web.xml
and how
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put your bean in a package and use the full name with package in the useBean tag. The compiled bean class must reside in a directory under classes that reflects the package. This has nothing to do with web.xml.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic