File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes JSF vs JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSF vs JSP" Watch "JSF vs JSP" New topic
Author

JSF vs JSP

Vamsee Kanakala
Greenhorn

Joined: Jul 14, 2004
Posts: 5
I read somewhere that JSP and JSF don't play very well with each other, leading to inconsistencies in element-rendering order. Does this mean that JSF is supposed to completely replace JSP?


Because joy is one's fuel - Ayn Rand
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
JSF pages are based on JSP. That is, a JSP page becomes a JSF page once you start using JSF taglibs for your forms. I can't figure out what these problems with rendering order might be, but then again, I haven't used JSF myself (yet)...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Does this mean that JSF is supposed to completely replace JSP?



JSF does not replace JSP ... because JSF use JSP Technology.


JavaServer Faces technology is a server-side user interface component framework for Java technology-based Web applications



The main components of JavaServer Faces technology are as follows:

An API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features
Two JavaServer Pages (JSP) custom tag libraries for expressing UI components within a JSP page and for wiring components to server-side objects




SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
James Holmes
Author
Ranch Hand

Joined: Jan 06, 2004
Posts: 64
Hi Vamsee,

There are some issues in using JSF and JSP together. This stems primarily from the fact that their processing lifecycles are incongruent. Hans Bergsten put together an article that details this. Following is the link.

http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html

As a side note, JSF is incompatible (for the most part) with current versions of JSTL.

Hope that helps,

James
JSF Resources and Console GUI tool
http://www.jamesholmes.com/JavaServerFaces/
 
Consider Paul's rocket mass heater.
 
subject: JSF vs JSP
 
Similar Threads
JSF 1.1 and JSP spec
Question regarding XForm / Form.
Renderer Kit - JSF
Accessing bean data within a scriptlet
categorize data display