This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Journal Article - JavaServer Faces 1.0 Part I Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Journal Article - JavaServer Faces 1.0 Part I" Watch "Journal Article - JavaServer Faces 1.0 Part I" New topic
Author

Journal Article - JavaServer Faces 1.0 Part I

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
The just-released April 2004 edition of The JavaRanch Journal includes an article by Gregg Bolinger, "JavaServer Faces 1.0 Part I".
Please use this thread to comment on and discuss the article.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
Greg,
Thank you for a to-the-point well written article on JSF, being a developer who is using Struts for about 6 months I can see the appeal of JSF but I have a few questions that perhaps you can shed some light upon:
1. I love the power of using Tiles, is it possible (or even a good idea) to use Tiles with JSF.
2. We are due to release a new version of our quoting system (currently a page centric application) in June which is using Struts as the framework - would it be good to roll that out as is or refactor it to use JSF while its still in development - it is not a big application so can not see it being a massive effort to move from Struts to JSF.
3. Is JSF production ready with the releae of 1.0 API and implementation, or should we still give it some time.
4. There has been much talk about the massive investments in JSF space so I am tempted to think it is pretty safe to move.
Thanks in advance for any feedback.
Faisal


The secret to creativity is knowing how to hide your sources.
Erik Hatcher
Author
Ranch Hand

Joined: Jun 11, 2002
Posts: 111
JSF - what an abomination. The example given would have been half the size and 10x clearer in Tapestry.


Co-author of Lucene in Action
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

1. I love the power of using Tiles, is it possible (or even a good idea) to use Tiles with JSF.
I'll have to get back with you on this. I'm not real sure. I know there are some libraries for using JSF Tags within Struts but I'm not sure how Tiles tie in to all this.
We are due to release a new version of our quoting system (currently a page centric application) in June which is using Struts as the framework - would it be good to roll that out as is or refactor it to use JSF while its still in development - it is not a big application so can not see it being a massive effort to move from Struts to JSF.
If it were me, I wouldn't move just yet. Struts is still a good, solid, proven framework. If what you got ain't broke... Plus, Sun's implementation of the JSF Spec is not clear on it's use meaning, you might not be able to use it in a production application due to licensing issues. However, there are several Free JSF implementations. JSFCentral has some good resources including links to these open source implementations.
Is JSF production ready with the releae of 1.0 API and implementation, or should we still give it some time.
The spec is ready. Sun's implementation is weak. Check out JSFCentral for some better, free, implementations.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Erik Hatcher:
JSF - what an abomination. The example given would have been half the size and 10x clearer in Tapestry.

I would love to see my login example using Tapestry if you would want to write it. I think Tapestry is an interesting framework. It's really different from all the other frameworks like Struts, JSF, WebWork.
Care to write something up??
Erik Hatcher
Author
Ranch Hand

Joined: Jun 11, 2002
Posts: 111
Originally posted by Gregg Bolinger:

I would love to see my login example using Tapestry if you would want to write it. I think Tapestry is an interesting framework. It's really different from all the other frameworks like Struts, JSF, WebWork.
Care to write something up??

Have a look at the VLib example that ships with Tapestry. It has a login page. It even uses a very slick "callback" feature of Tapestry allowing the login page to bounce you back to the page you originally attempted very elegantly.
I'm in the midst of building a sophisticated suite of applications using Tapestry as well as wrapping a book on Lucene, so my free time is taken up with responding to web forums (but one of these days if I'm reminded, I'd be happy to work up this example - although I think VLib covers it)
Piet Snot
Greenhorn

Joined: Jun 25, 2003
Posts: 18

The example won't run tomcat gives the folowing error
This absolute uri (http://java.sun.com/jsf/html) cannot be resolved in either web.xml or the jar files deployed with this application
Don't I have to map the uri http://java/sun.com/jsf/html to a place on my computer?
Piet
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Piet Snot:
The example won't run tomcat gives the folowing error
This absolute uri (http://java.sun.com/jsf/html) cannot be resolved in either web.xml or the jar files deployed with this application
Don't I have to map the uri http://java/sun.com/jsf/html to a place on my computer?
Piet

What version of Tomcat are you running? The TLD's are wrapped up inside the jsf-api.jar file. So you shouldn't have to declare them in the web.xml file. If you included that jar file in your WEB-INF/lib folder, it should find the tld's it needs. It could be that this only works with the new J2EE 1.4 spec. But I am not 100% sure about this. I will see if I can find out.
Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
It works on older J2EE containers too, I have used it with Tomcat 4.1.24 and works just fine. Like Gregg said, you have to ensure the jar files are under the WEB-INF/lib folder.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Faisal Khan:
It works on older J2EE containers too, I have used it with Tomcat 4.1.24 and works just fine. Like Gregg said, you have to ensure the jar files are under the WEB-INF/lib folder.

Thanks Faisal.
Piet Snot
Greenhorn

Joined: Jun 25, 2003
Posts: 18

There aren't any tld files in the jsf-api.jar file, just class-files? Am I using the wrong jar files, there are coming from the sun website just as it states in the article??
Any thoughts?
Piet
Erik Hatcher
Author
Ranch Hand

Joined: Jun 11, 2002
Posts: 111
Originally posted by Gregg Bolinger:

Care to write something up??

Geoff Longman (creator of Spindle, the Eclipse Tapestry plugin) has created a Tapestry version of your JSF application.
He has made it available here
Jeff Caesar
Greenhorn

Joined: Aug 19, 2004
Posts: 1
Hey, thanks for writing this up. This worked with jsf-1_1, though I also needed to add jstl.jar.
Sunesh Kumar
Ranch Hand

Joined: Oct 17, 2005
Posts: 89
Hi Gregg Bolinger,

i just beginned to learn JSF and this article helped a lot..but i cant to able to run it...

it gives me

HTTP Status 404 - /jsflogin/faces/login.jsp

message /jsflogin/faces/login.jsp

description The requested resource (/jsflogin/faces/login.jsp) is not available.

Apache Tomcat/5.0.28


what should i do now...


Thanks & Regards<br />Sunesh Kumar Baachu
Sunesh Kumar
Ranch Hand

Joined: Oct 17, 2005
Posts: 89
Hi,

Could any one please guide me what i have to do...

Bye..
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I copied all the files as it is, but getting this exception:





Thanks.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Rathi,

Could you please post this as a separate thread in the JSF forum? Since most of this thread discusses both JSF and Struts, I'm leaving it in the Struts forum, but you'll have a better chance of getting a response if you post this in the JSF fourm.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Journal Article - JavaServer Faces 1.0 Part I
 
Similar Threads
Books for JSF
Not reading properties file
ANNOUNCE: Metadata based validation for JavaServer Faces – Part 1
November 2003 Journal Article Discussion - Practical JSTL - Part II
Which Eclipse realise to develop JSF?