File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Should I abandon servlets when using JSF ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Should I abandon servlets when using JSF ?" Watch "Should I abandon servlets when using JSF ?" New topic
Author

Should I abandon servlets when using JSF ?

Edisandro Bessa
Ranch Hand

Joined: Jan 19, 2006
Posts: 584
Hi guys,

Could you please tell me where is the best place to put business logic when using JSF ?

Before start using JSF, I was used to call my business logic from within Servlets through some business delegate classes.

After migrate to JSF, I am still using my business delegate classes but from within Managed and Backing beans instead.

I don't see any reason for using servlets anymore ? Am I correct ? Should I abandon servlets when using JSF ?

Thanks a lot.
Edisandro.


"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Edisandro,

Yes don't really require the servlets anymore if you're using JSF. Your business logic goes in methods inside the beans.

Regards
Zein
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

However, the beauty of JSF is that you don't have to convert the entire project at once. Add JSF functionality when it's convenient - the older code will continue to run as long as you follow J2EE best practices. Which mostly means paying attention to variable scope.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
Edisandro Bessa
Ranch Hand

Joined: Jan 19, 2006
Posts: 584
Thanks a lot guys for your prompt replies.
 
IntelliJ Java IDE
 
subject: Should I abandon servlets when using JSF ?
 
Threads others viewed
JSF in sequence Diagram
struts2 MVC pattern - business logic question
JEE 5 and business delegate pattern
Struts's Action as business delegate
JSP where to start?
developer file tools