• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question reagarding beans

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic