File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Do I need JavaBeans? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Do I need JavaBeans?" Watch "Do I need JavaBeans?" New topic

Do I need JavaBeans?

Subbu Aswathanarayan
Ranch Hand

Joined: Jun 22, 2001
Posts: 73
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?

Snylt Master
Ranch Hand

Joined: Jul 07, 2001
Posts: 55
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!
// Snylt Master

Preparing for the Java 2 Certification exam
Subbu Aswathanarayan
Ranch Hand

Joined: Jun 22, 2001
Posts: 73
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?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12868
Why not just use a static method in a class that all servlets and JSP import?
wood burning stoves
subject: Do I need JavaBeans?