This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes bean:define to define a bean of specific object type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:define to define a bean of specific object type" Watch "bean:define to define a bean of specific object type" New topic
Author

bean:define to define a bean of specific object type

Chris Kul
Greenhorn

Joined: Jul 21, 2008
Posts: 3
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

Joined: Apr 01, 2009
Posts: 643
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?
 
GeeCON Prague 2014
 
subject: bean:define to define a bean of specific object type