Struts Vs JSF (A comparison of Struts against JSF)

By: Freddy Ng Emailed: 1644 times Printed: 2113 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Components

§Rich infrastructure.
 
§There's only one Struts
§Struts is an open-source product, whereas JSF is a specification. As young as JSF is, we have two excellent JSF implementations to choose from: the Reference Implementation from Sun and MyFaces, from Apache. On the other hand, there's only one Struts.
§
 
POJO Action Methods
§Struts actions are tied to the Struts API, but JSF action methods can be implemented in Plain Old Java Objects. In struts the form bean contains data and the action bean contains logic. OO purists want to put them together, but you can't with Struts. In JSF, you can spread out your data and logic, or put them in one object. The choice is yours.
§
 
Managed Beans
§Like Spring, JSF uses dependency injection (or inversion of control, if you will), for instantiating and initializing beans. It's true that Struts creates action beans and form beans for you, but JSF generalizes that concept and adds the ability to initialize managed beans—of any type—created by the framework.
§
 
Event Model
§JSF has an event model that lets you react to value changes, actions, and phase changes in the JSF lifecycle.
§
 
Renderers
§Struts tags generate HTML directly. JSF component tags, don't generate anything; instead, they refer to a component-renderer pair on the server. The component maintains state whereas the renderer is in charge of rendering a view. The point here is that renderers are pluggable: you can replace the default renderers with your own implementations

JSF Home | All JSF Tutorials | Latest JSF Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Freddy Ng
Struts Vs JSF (A comparison of Struts against JSF)
What is CAVAJ Java Decompiler?

More Tutorials in JSF
Struts Vs JSF (A comparison of Struts against JSF)
faces-config.xml to DirectTraffic in the JSF Application
<convertNumber> and <convertDateTime> in JSF
Action listeners in JSF
Calling Multiple Listeners in JSF
Using Javascript in JSF
How to open a new browser window from my JSF page?
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
JSF - TreeNode.setID gets IllegalArgument Exception
Install and Deploy JBoss Application Server
What is JSF (JavaServer Faces)?
Differences between JavaServer Faces technology and Struts
JSF Basics
The Relationship Between JSF and Other Java EE Technologies
JSF Life Cycle

More Latest News
Most Viewed Articles (in JSF )
How to open a new browser window from my JSF page?
Action listeners in JSF
JSF Life Cycle
Java Bean Scopes in JSF
Using Javascript in JSF
Struts Vs JSF (A comparison of Struts against JSF)
Install and Deploy JBoss Application Server
JSF Basics
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
Calling Multiple Listeners in JSF
What is JSF (JavaServer Faces)?
Differences between JavaServer Faces technology and Struts
The Relationship Between JSF and Other Java EE Technologies
Installing JSF
Controlling Page Navigation in JSF - Static and Dynamic Navigation
Most Emailed Articles (in JSF)
Controlling Page Navigation in JSF - Static and Dynamic Navigation
Accessing Context Data in Beans using JSF
Using Javascript in JSF
Calling Multiple Listeners in JSF
JSF Basics
JSF Life Cycle
Installing JSF
How to open a new browser window from my JSF page?
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
JSF - TreeNode.setID gets IllegalArgument Exception
faces-config.xml to DirectTraffic in the JSF Application
Action listeners in JSF
Struts Vs JSF (A comparison of Struts against JSF)
Install and Deploy JBoss Application Server
What is JSF (JavaServer Faces)?