This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes JSP and Java Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP and Java Beans" Watch "JSP and Java Beans" New topic
Author

JSP and Java Beans

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi!
I've done some extensive work with servlets. Now i'm doing jsp.
The jsp model 2 architecture specifies that use
jsp for presentation
servlet as the controller
java bean for business logic.
My question is what if i put all business logic in servlet and do not use java beans??
Can we do away with java beans?
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Of course it depends on what you want to do.
The important thing is (and I think you got it) the clear separation of presentation (JSP) and logic or as I call them, calculations needed by the Web Application.
Your bean vs. servlet question is hard to answer if we don't know the complexity of the "calculations".
Of course a Servlet can do it. The question is "Reusability". If you need it, then beans are the answer. IF not, maybe the servlet can do a one-time processing of data.
My experience says that reUsability is more important

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and Java Beans
 
Similar Threads
How Code Resuability easy in servlet
Datasource
bussiness logic and presentation logic
wat is MVC architecture ?
Web Frameworks