• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Journal Article - JavaServer Faces 1.0 Part I

 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF - what an abomination. The example given would have been half the size and 10x clearer in Tapestry.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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)
 
Greenhorn
Posts: 18
IntelliJ IDE Firefox Browser Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 18
IntelliJ IDE Firefox Browser Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, thanks for writing this up. This worked with jsf-1_1, though I also needed to add jstl.jar.
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Sunesh Kumar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

Bye..
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I copied all the files as it is, but getting this exception:





Thanks.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
You got style baby! More than this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic