• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Beans for jsp

 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic