Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question reagarding beans

 
Dinuka Arsakularatne
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

if you are using the tag <jsp:useBean id=.... /> , do you write the bean class as a normal java class or do you have to import java.bean.* and java.io.Serializable ? if so, why do you have to import java.io.Serializable?

thanks in advance

Dinuka Arseculeratne
 
Vikrant Pandit
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write your bean as a normal java class as long as it follows the Bean law ( Pg. 370 HFSJ )

You can consider marking your Java class as serializable in case you want your bean to get migrated along with session if an object of the bean is bound to the session
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic