• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaBeans and JSPs

 
Steve McCain
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To bean or to bean that is the question!
Do the classes referred to in the jsp:useBean tag really have to be beans (ie having associated InfoBean classes) or can any classes be used? I'm using objects just to hold data that is used by JSPs but I don't need any event handling so if possible I would prefer not to have to use JavaBeans.
Any advice will be gratefully received
Steve McCain
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beans used in JSP can be ultra-simple and don't need to have any auxilliary classes. Mainly:
public no-args constructor
getter and setter methods - the naming convention MUST followed.
Bill
------------------
author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!