Results 1 to 5 of 5

Thread: JSP or JSF

  1. #1
    Join Date
    Mar 2012
    Posts
    4

    Default JSP or JSF

    Hi. Just teaching myself Spring so apologies for newbie question. When developing web apps using Spring (Spring MVC?), is it normal to use JSPs or JSF? In my experience, in the non-Spring Java world, there has been a gradual move away from JSPs to JSF over the last few years. However, I notice a lot of the Spring doco and forum posts refer to JSPs rather than JSF.

    Is there a consensus in the Spring community if it is better to use one or the other if writing a web-app from scratch using the latest version of Spring?
    Last edited by CodeClimber; Mar 21st, 2012 at 07:19 AM. Reason: changed Title

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    JSF is a specification, you have some implementations like PrimeFaces, RichFaces etc and JSF is related with the JEE 6 specification. So if you want work with *pure* Oracle/Sun specification you would think in JSF/EJB etc

    Spring MVC work closely with JSP. If you want integrate JSF (view) + Spring (for any reason) you should consider only
    Spring Web Flow + JSF 2.0

    Personally I work with pure Spring: Spring Core + Spring MVC + Spring MVC and others

    Around the world, and keeping the idea that Java is wide, you would see developers working with only Oracle/Sun JEE6 specification and other with Spring. Of course Spring makes your JEE life easier.

    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Mar 2012
    Posts
    4

    Default

    Hi Mauel. Thanks for the detailed reply. I guess when I was comparing JSP to JSF I really meant to compare JSP to Facelets / XHTML.

    Following on from that, if I am using JSPs (+ Spring MVC etc.), are there UI and AJAX component libraries available to me to use (similar to PrimeFaces, IceFaces etc.)?

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    Thanks for the detailed reply
    You're welcome

    Something that I forgot to write is about that JSF is better than Struts, both handle in their own way the MVC pattern

    Following on from that, if I am using JSPs (+ Spring MVC etc.), are there UI and AJAX component libraries available to me to use (similar to PrimeFaces, IceFaces etc.)?
    I only know *pure* JSF for academic purposes, I have no experience with PrimeFaces nor IceFaces, but to include a rich UI and Ajax support in a JSP file I use jQuery, It is a powerful option available, consider Dojo too.

    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  5. #5
    Join Date
    May 2011
    Location
    Madrid (Spain)
    Posts
    101

    Default

    Hi, I'd like to share these differences about this subject.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •