Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the difference between JSP and JSF ?

 
Venki Ananth
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Can anyone explain what is major difference between JSP and JSF? why we need JSF?

Any sample application please!

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is a view technology which allows interaction with Java in form of taglibs and EL.
JSF is a component based MVC framework which provides taglibs for use in JSP.

When you want to use JSF, I highly recommend Facelets as view technology over JSP. Facelets is going to be the default supported view technology as per the upcoming JSF 2.0.
 
Prathamesh Gaddam
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bauke Scholtz wrote:
JSF is a component based MVC framework which provides taglibs for use in JSP.


Thank you, Bauke Scholtz. Your precise reply helped me to get an overview difference about JSF and FACELETS. However, I'm unable to get, JSF is a MVC framework. I'm assuming that its a frameworks only for view technology, is it right?

Please clarify accordingly, to differenciate between Faclets and JSF.

Thank you in advance!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Facelets is also a view technology like JSP. It only offers more seamless interaction with JSF than what JSP offers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic