Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do I need JavaBeans?

 
Subbu Aswathanarayan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I web application has 6 servlets and 3 JSP pages, and all of these need to call the same function.should I implement this function as a bean?
Subbu
 
Snylt Master
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Must depend on what sort of function your dealing with. Is it just a simple one then write the source in a jsp file and include it , on the other hand , if it's a complex one maybe javabean will do the trick!
Can anyone suggest from their own experience what you would have done... and why!
Regards
// Snylt Master
 
Subbu Aswathanarayan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Snylt Master,
Yes, the function is indeed a simple one but all the servlets and JSP pages have to call it.what do u suggest now?
Thanks,
Subbu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not just use a static method in a class that all servlets and JSP import?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic