aspose file tools*
The moose likes Servlets and the fly likes Doubt in using bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Doubt in using bean " Watch "Doubt in using bean " New topic
Author

Doubt in using bean

veeramani velayutham
Greenhorn

Joined: Dec 10, 2004
Posts: 11
When we go for bean and when we go for simple java class, which have only business logic
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
As used in servlets and JSP, a JavaBean is just a Java class that follows certain naming and access conventions which let you take shortcuts in JSP page code. If you don't want to use those shortcuts, don't use bean conventions.
In any helper class - bean or non-bean - you just need to keep in mind the scope of the object as related to the multi-threaded nature of web applications.
Bill
gudla Dathathreya Reddy
Greenhorn

Joined: May 05, 2004
Posts: 15
Beans are used especially when you want to hold some data and this data can be transmitted from business layer to presentation or database layer to business layer etc. Most cases to hold data use bean. At the same time beans are some type of Java classes with some convention rule such as it should have a constructor with zero arguments, data member and setter, getter methods.
When you come accross to use a java class it can be use for any activities apart from holding data.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Java beans are very important with respect to JSP since many of the JSP mechanisms, be they JSP actions that operate upon data or the new Expression Language (EL), expect data to be bean-patterned. Non-bean-patterned data just won't work well with these mechanisms.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in using bean