aspose file tools*
The moose likes Servlets and the fly likes Beans for jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Beans for jsp" Watch "Beans for jsp" New topic
Author

Beans for jsp

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi all!
I'm making beans for my jsp's.
Can we have any method in our beans other than get and set methods.
Regards
Danish Shaukat
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
sure u can have ..
and u can acees them by using fully qualified nameslike
objectname.method()
u can't use properties tags for setting and getting them
Dustin Marx
Ranch Hand

Joined: Mar 06, 2001
Posts: 40
JavaBeans are basically just Java classes that meet a few minor restrictions (such as having a constructor that accepts no arguments). This is one of the reasons I like moving Java syntax out of a JSP and into a JavaBean when possible -- the underlying JavaBean can be used by other non-JSP applications (any applications that can make use of Java classes). This is also why I try to make my Java custom tag handler classes as small as possible and have them utilize JavaBeans -- while the JavaBeans are as reusable as the functionality placed in them, Java tag handlers are really only usable by JSPs.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hai Shaukat
u can hav ur methods in beans its as good as having
methods in ur java application
cook ur business logic with beans so tah they can be used in very many places
bye
Originally posted by Danish Shaukat:
Hi all!
I'm making beans for my jsp's.
Can we have any method in our beans other than get and set methods.
Regards
Danish Shaukat


------------------
Thanks & Regards
Praveen
 
Don't get me started about those stupid light bulbs.
 
subject: Beans for jsp