aspose file tools*
The moose likes JSP 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 » Java » JSP
Bookmark "JSF Vs JSP" Watch "JSF Vs JSP" New topic
Author

JSF Vs JSP

Mala Gupta
Author
Ranch Hand

Joined: Sep 27, 2002
Posts: 251
    
    9
will JSF replace JSPs?


Author of Manning's OCA Java SE 7 Programmer I Certification Guide and OCP Java SE 7 Programmer II Certification Guide
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
I think the elementary difference is JSP is presentation level, while JSF is component level, and thus, they are supplementary, rather then substite each other.
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Jan Jani
Ranch Hand

Joined: Feb 05, 2004
Posts: 35
No JSF will not replace the JSP
JSP is sub part of JSF
~JANI
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by Jan Jani:
No JSF will not replace the JSP
JSP is sub part of JSF
~JANI

I thought it was the other way.


Groovy
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
From the Web Services Tutorial:

The main components of JavaServer Faces technology are:
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 of these features.
A JavaServer Pages (JSP) custom tag library for expressing UI components within a JSP page.

IOW JSF builds on top of JSP and JSTL yet another layer of classes and stuff to learn...


42
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hello Jeroen
Does JSF solve the shortcomings in JSP.
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Pradeep,
JSF will not fundamentally keep people from putting Java code into their JSP's but it will help.


TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982

JSF will not fundamentally keep people from putting Java code into their JSP's but it will help.

In this aspect, I think it do similar stuffs with JSTL, maybe even do more.
Nick.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Nicholas Cheung:

In this aspect, I think it do similar stuffs with JSTL, maybe even do more.
Nick.

No, it won't do anything similar to JSTL. In fact, JSF uses the JSTL. JSTL has no UIComponent tags at all. The only similarity I can find btween jstl and JSF is JSTL's <cut..> and JSF's <hutputText...>. Maybe there are a few more, but not enough, IMO, to support your statement.


GenRocket - Experts at Building Test Data
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
um... it is hard to say.
In general, JSTL is a set of custom tags that provides the basic HTML scripting to JSPs, and thus, it provides a standardize way for handling HTML and JSP scriptless, and tries to minimize the JSP scriptless or HTML code inside JSPs.
However, JSF is more than that, it is another set of custom tags, not necessary be JSTL cos it is not focus on presentation, it focus on components, and thus, the tag are component-oriented.
In fact, Struts also develops its own tags, as Bill said, tag is the extension of JSP, and each technology may has its own set of tags.
Nick.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Pradeep Bhat:

I thought it was the other way.

Yeah, I think I should agree with Pradeep Bhat... Instead of saying that JSP is part of JSF, should it be said that JSF is additional tool filling up the disadvantages of JSP?


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Ko Ko Naing:

Yeah, I think I should agree with Pradeep Bhat... Instead of saying that JSP is part of JSF, should it be said that JSF is additional tool filling up the disadvantages of JSP?

The problem with comparing JSF to JSP is the scope of both.
JSPs, correctly designed, are used for the view in an MVC web applications. I think we have established this many times over throughout this weeks conversations.
JSF, on the other hand, consists not only of the view, but the Control as well. It makes more sense to compare JSF to Struts or WebWork.
will JSF replace JSPs?
Further more, to say that JSF might replace JSP is just strange. Really, you use JSP's with a JSF Web Application. You just use JSF components in your JSP.
JSP's are simply HTML pages with Tags, Scriptlets (maybe) and EL (if using 2.0). The view part of a JSF Web App is no different.
Would you ask if Struts was replacing JSP? Of course not. We need to remember that the scope of JSF goes well beyond the view or a JSP.
 
Don't get me started about those stupid light bulbs.
 
subject: JSF Vs JSP