wood burning stoves 2.0*
The moose likes Struts and the fly likes JSF and Struts 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 » Frameworks » Struts
Bookmark "JSF and Struts " Watch "JSF and Struts " New topic
Author

JSF and Struts

Juan M.
Greenhorn

Joined: Jan 04, 2005
Posts: 6
Hi,

I'm trying to get a clear view of what Struts and JSF are for.

After reading Craig McClanahan's Weblog I think I got a clear view of what Struts and JSF are for.

If I understood it correctly, Struts is, by no way, something you can just avoid if you would like a MVC design in your web page (well, you can use another framework or your own, but certainly JSF doesn't provide a solution for it). In fact, JSF only provides the proper tags for the view tier. In this area, Struts tags and JSF overlap, but just in this area. JSF don't touch the controller area (or client-side validation). So, there is no JSF vs. Struts when you are considering using a MVC framework and you like Struts.

Have you used both ? Is this correct ?

Thanks in advance,

- Juan

[ January 11, 2005: Message edited by: Juan M. ]
[ January 11, 2005: Message edited by: Juan M. ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

In O'Reilly's JavaServer Faces book, Hans Bergsten refers to Struts as an application framework and JSF as a User Interface framework. The former acts as a traffic cop of HTTP requests while the latter focuses on the user interface details.
"There's some overlap between Struts and JSF, though. Both define mechanisms for page navigation and validation, for instance, but they are so flexible that you can pick and choose which should be in charge of these tasks."


A good workman is known by his tools.
Juan M.
Greenhorn

Joined: Jan 04, 2005
Posts: 6
Thank you for your help. Would you advise to buy the Hans Bergsten's book you mention or David Geary's Java Server Faces ? I was looking for a good book about JSF but didn't know which one to read.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF and Struts
 
Similar Threads
Why JSF?
which j2ee framework is your choose?
Struts/Server Faces/Struts-Faces
Generating Html
Spring in the business layer