File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Vs JSP

 
Mala Gupta
Author
Ranch Hand
Posts: 281
9
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jan Jani
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No JSF will not replace the JSP
JSP is sub part of JSF
~JANI
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jeroen
Does JSF solve the shortcomings in JSP.
 
Bill Dudney
Author
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pradeep,
JSF will not fundamentally keep people from putting Java code into their JSP's but it will help.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic