• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What Is the Best Way to Learn JSF Quickly?

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have used the Struts framework for a while. Now, my employer is considering using JSF. What is the best way to learn JSP quickly?
 
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
Buy a book and start coding. Don't use a visual editor like Java Studio Creator. Just use something like Eclipse or IDEA or Netbeans. Hand coding is the best way to really learn what is going on.

I'd recommend starting with my JavaServer Faces Tutorial and then buy a book like JavaServer Faces in Action. Another good resource is JSFCentral which is maintained by the author of JavaServer Faces in Action and also JamesHolmes.com where you will find a bunch of useful resources.

And last but not least ask lots of questions on Javaranch.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gregg,

I was hoping you could help with a question about your JSF Tutorial (the one you linked to above). I've run through all the steps and I'm getting a NullPointerException when I try it through the browser. I am probably doing something really silly, because I really have little idea what I'm doing (little Java experience, very little J2EE experience, etc.)

The problem seems to be related to the application's web.xml:
When I run ant in the jsflogin directory, it gives me a warning that "selected war files include a WEB-INF/web.xml which will be ignored." When I look inside the war, the correct web.xml file is there, and it does get copied out into the webapps/jsflogin/WEB-INF directory when I run Tomcat.

But the Tomcat logs contain various complaints about not finding the web.xml file, such as this one (in stdout.log):
INFO: Missing application web.xml, using defaults only

Any ideas? The ant warning suggests using "webxml attribute to war task", but as far as I can tell there already is one...so I'm stumped. Many thanks if you can help!
 
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Margaret,

I have successfully deployed Gregg's tutorial without difficulty.

You can safely ignore the peculiar "selected war files include a WEB-INF/web.xml which will be ignored." message from Ant.

As to the problem deploying, I've run into this situation myself with regard to missing files and it seems to be a Tomcat problem has when it runs into errors. The most certain workaround I know is to :
1. undelpoy the app in Tomcat
2. stop Tomcat
3. remove any files for the app that Tomcat may have failed to remove, including the war
4. restart Tomcat
5. deploy the app

I don't understand why this annoying problem sometimes happens, even in Tomcat 5 which is way better than Tomcat 4 at releasing files and cleaning up after it runs into problem. I hope this helps.
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I second Gregg's recommendation of Java ServerFaces In Action. I got it yesterday and it's very good. It not only describes the how but the why.
You should also note that manning.com has extra material that purchasers of the book can obtain from the website.
 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Eclipse support JSF or does it need a plugin? If so is there a free plug in for it?
 
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 Anselm Paulinus:
Does Eclipse support JSF or does it need a plugin? If so is there a free plug in for it?



Depends on what you mean by support. Any IDE that supports JSP will support JSF. JSF is just a taglib you use in a JSP. If you are looking for something that allows you to drag and drop components onto a page similar to a GUI creator of sorts, then no, Eclipse does not support this and as far as I know there is not a plugin for Eclipse that does. There is FacesConsole that can run as standalone or an Eclipse plugin but all it does is edit the faces-config for you.
 
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 Ken Krebs:
Margaret,

I have successfully deployed Gregg's tutorial without difficulty.

You can safely ignore the peculiar "selected war files include a WEB-INF/web.xml which will be ignored." message from Ant.

As to the problem deploying, I've run into this situation myself with regard to missing files and it seems to be a Tomcat problem has when it runs into errors. The most certain workaround I know is to :
1. undelpoy the app in Tomcat
2. stop Tomcat
3. remove any files for the app that Tomcat may have failed to remove, including the war
4. restart Tomcat
5. deploy the app

I don't understand why this annoying problem sometimes happens, even in Tomcat 5 which is way better than Tomcat 4 at releasing files and cleaning up after it runs into problem. I hope this helps.



Sorry, took me a while to get back to this post. Uh, diddo on all that Ken said.
 
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anselm Paulinus:
Does Eclipse support JSF or does it need a plugin? If so is there a free plug in for it?



There is one plugin in sourceforge
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE

Try to google for more.
 
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 Varun Khanna:


There is one plugin in sourceforge
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE

Try to google for more.



Did you get the java-blogs update in your mail just now too? I was just getting ready to come here and post that as well.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • 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:


Did you get the java-blogs update in your mail just now too? I was just getting ready to come here and post that as well.



I saw it in Sun forums
[ March 13, 2005: Message edited by: Varun Khanna ]
 
Margaret Moser
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anselm Paulinus:
Does Eclipse support JSF or does it need a plugin? If so is there a free plug in for it?



Hi Anselm,

Would something like this be helpful?

http://www.exadel.com/products_jsfstudio.htm

It's not free (in fact it's VERY not free - $500), but it sounds like what you're asking about...?

Margaret
 
Margaret Moser
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ken,

Thanks for responding to my question. In the end I figured out that I had bollixed things up trying to install a different JSF tutorial app, and once I cleaned out the various strange configuration changes it had made things got better.

I have another question now though...I ran into a little error after redeploying, in which Tomcat said it couldn't find the "bundle.Messages" resource. I tried renaming the Message.properties file to Messages.properties, and voila, everything works now. Which is great! but I am wondering why it made a difference to change the filename when the tutorial says the filename doesn't matter as long as it ends in .properties... any ideas?

Margaret
 
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 Margaret Moser:
Hi Ken,

Thanks for responding to my question. In the end I figured out that I had bollixed things up trying to install a different JSF tutorial app, and once I cleaned out the various strange configuration changes it had made things got better.

I have another question now though...I ran into a little error after redeploying, in which Tomcat said it couldn't find the "bundle.Messages" resource. I tried renaming the Message.properties file to Messages.properties, and voila, everything works now. Which is great! but I am wondering why it made a difference to change the filename when the tutorial says the filename doesn't matter as long as it ends in .properties... any ideas?

Margaret



Look at the following line:


[/code]

I probably worded it a bit poorly. What I mean is it doesn't matter what you name your properties file as long as it end in .properties keeping in mind that the basename attribute of the loadBundle tag should match the name of your .properties file. So if you had put this originally:



it would have worked. Hope that helps.
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Varun Khanna:


There is one plugin in sourceforge
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE

Try to google for more.



Thanks Varum and Gregg.
This might do for my learning purpose. Will try it out.
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Daniel Gee:
I have used the Struts framework for a while. Now, my employer is considering using JSF. What is the best way to learn JSP quickly?



Boy I know folks are going to slam me for this but I would strongly recomend starting out with Java Studio Creator, buying the Java Studio Creator Field guide book to go along with it, and spend a week with that. You will be amazed at how much you can do.

Once Creator builds everything and wires it up, take a look at the source it creates. Change something, and see how that affects the source.
[ March 15, 2005: Message edited by: Darrin Smith ]
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.jsftutorials.net/index.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic