Getting started with JSF

hi,

I followed this tutorial,
JSF KickStart Tutorial

everything went fine, build was successful, but when try to run get this error:

rg.apache.jasper.JasperException: Can’t find bundle for base name jsfks.bundle.messages, locale en_US

has to do w/that property file… now I’m using same kind of property file (.properties) in other webapps (not JSF) in same Tomcat container, with no problems… don’t know why it’s not working here…

and I’m not the only one w/this exact same problem:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:

somebody there suggested this:

create a folder called bundle under WebContent\WEB-INF\classes\jsfks and copy the messages.properties

but tried this and it didn’t work (tried also to load pages/inputname.jsp directly, and get this error:

java.lang.NullPointerException
com.sun.faces.taglib.jsf_core.LoadBundleTag.doStartTag(LoadBundleTag.java:96)

(this is in Tomcat 5.5.31… it says in Tutorial that Tomcat 5.0 is ok, so anything above that should be ok…)

would appreciate suggestions…

thank you…

That solution does sound right on adding the “messages.properties”. Still, maybe you want to look for a simpler JSF example

Check out JSF 2.0 Tutorial (JavaServer Faces 2 Tutorial)

Also… are you learning JSF 1? You should definitely use 2 instead.

Another “also”… You do not need Exadel IDE. Normal “Eclipse” will do.

thank you very much for yr response… actually I start a new job tomorrow where they use JSF… wanted to get a bit of a head-start…:wink: have never used it before (so I guess will first find out what version they use… I’m front-end, so will be doing no (or next to none) back-end development… but will be working in that env…) also: didn’t pay heed to IDE thing, used Dreamweaver… code is just text, for something simple like this of course you should be able to use any editor you want…:wink:

it turns out I’m a moron and had .properties file in wrong location… but, after putting at correct location and rebooting Tomcat and building again, now get this error:

org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException:
Can’t instantiate class: ‘jsfks.PersonBean’… jsfks.PersonBean

which to me this error makes sense, actually, b/c after building cannot find PersonBean.class anywhere (it’s certainly not in dir ‘class’…) so not sure what the deal is with this…

will try tutorial you mention… thank you very much…

Congrats on getting the job!!!

To me, you’re just trying to deploy the code w/o understanding it. That’s kind of like sky diving w/o parachute. Also, do not mention the word “Dream Weaver”… if there’s any decent Java Developer there… he’ll be thinking “oh gawd…who do we have here…”. In these days, MVC framework has evolved to a point that there is no point of calling someone front-end or back-end developer. Maybe you can call someone who does 100% JSF work as a front-end and someone who only does Web Service can be considered back-end developer… Anyways, calling front-end and back-end is a relative term depending on the architectural layer. I’m not sure if you have learned “Servlets and JSP” but I suggest this would be your very step then jumping straight into JSF. G’luck!

thank you for your response… I learned JSP and servlets a long time ago (2004)… AFTER having learned core java language… (in fact am my entire website is in JSP/Tomcat, and all content for my photosite is loaded dyn. with JSP (just scriptlets, but oh well…:wink: it’s fine for my personal, non-commercial site… (I do things like use java.io to count how many photos in ‘images’ dir for each page and so create divs for all photos, and lots of other stuff… all content is generated dynamically (except for “color theme” and social netw links), like the links for the diff sections, pages w/in sections (diff no. of pages w/in each section, photo-captions, etc… www.francesdelrio.com/photoblog/ )

but am not too much of an expert on frameworks… (except struts as pertains to the front-end (tags, tiles/layout…) which I used at a job where I worked for two years… I don’t think I will be writing java classes at this new job for JSF… but whatever is involved on the front-end (tags, etc…) I will probably be expected to do (they know I have never used JSF, so it’s not a prob in that regard…)

as long as I run the build in ant and it’s successful I don’t see why it matters what text editor I use to populate JSP’s or web.xml or anything else… (I wiil probably be using Eclipse at work, which I have used before… )

as for deploying code w/o understanding it, my approach when learning something new (and using code-examples) is usu. to first deploy the code, THEN when am sure it works, I start studying it…:wink:

(still don’t get, in this example, where PersonBean.class lands after the build…)

thank you…

That’s pretty fascinating. I did hear people who does exactly as you described and thought it was a myth. I can’t imagine JSF programmer not doing the JSP’s… Ah well~ well that myth is now debunked.