File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


Vamsee Kanakala

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

Joined: Jan 23, 2002
Posts: 11962
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

Java Developer, Thailand
James Holmes
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.

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

Hope that helps,

JSF Resources and Console GUI tool
I agree. Here's the link:
subject: JSF vs JSP
jQuery in Action, 3rd edition