aspose file tools*
The moose likes JSF and the fly likes What Is the Best Way to Learn JSF Quickly? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "What Is the Best Way to Learn JSF Quickly?" Watch "What Is the Best Way to Learn JSF Quickly?" New topic
Author

What Is the Best Way to Learn JSF Quickly?

Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
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?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

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.


GenRocket - Experts at Building Test Data
Margaret Moser
Greenhorn

Joined: Mar 03, 2005
Posts: 5
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!
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
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.


kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
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.
Anselm Paulinus
Ranch Hand

Joined: Sep 05, 2003
Posts: 389
Does Eclipse support JSF or does it need a plugin? If so is there a free plug in for it?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

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.
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
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.


- Varun
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

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

Joined: May 30, 2002
Posts: 1400
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

Joined: Mar 03, 2005
Posts: 5
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

Joined: Mar 03, 2005
Posts: 5
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15290
    
    6

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

Joined: Sep 05, 2003
Posts: 389
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.
Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
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 ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

http://www.jsftutorials.net/index.html


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What Is the Best Way to Learn JSF Quickly?
 
Similar Threads
Hibernate & Springs
About JSF Framework.
New to Swing
JSF IDE
difference between JSP and JSF?