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

bean:define to define a bean of specific object type

 
Chris Kul
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I am trying to define a bean using following syntax and set value in it using JSP scriptlet.

But I am always getting following exception;


Any idea what is wrong here?

cheers
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with the <bean:define> tag, but in the JSP <jsp:useBean> tag, if you specify the class with type="classname" it will not create an instance of the class - instead it will expect to find the object in the session (or wherever). If you want it to create the object if it doesn't already exist, you have to use class="classname". Perhaps it's the same with the <bean:define> tag?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic