Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsJSF and Eclipse aren't the best of mates
https://www.eclipse.org/forums/index.php/mv/msg/68218/214028/#msg_214028
start.jsp (which forwards to)
login.jsp (which conducts a log-in using a form, and forwards to)
welcome.jsp
and I've got a bean in there too.
Since Eclipse won't bundle the Jakarta JARs for me, put them into my
project, etc., I created a library named JSF via right-clicking on my
project, choosing Preferences, then Java Build Path->Libraries. There
I've got
Running by right-clicking on start.jsp and choosing Run As... I get and
HTTP status 500:
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/core cannot be resolved in either web.xml or the
jar files deployed with this application
So, I copy all these JARs onto the path
<workspace><project-name>/WebContent/WEB-INF/lib and run again--same result.
Could someone explain why Eclipse doesn't help me put together a JSF
project (when NetBeans makes it PERFECTLY transparent and a no-brainer)
and, therefore, how a JSF project is built in Eclipse.
I have read and attempted a couple of on-line tutorials on JSF and
Eclipse. They don't work and break down part-way through the exercise.
Russ Bateman]]>Russell Bateman2008-05-20T00:47:15-00:00Re: JSF and Eclipse aren't the best of mates
https://www.eclipse.org/forums/index.php/mv/msg/68218/214079/#msg_214079
> project, choosing Preferences, then Java Build Path->Libraries. There
Please see the JSF tutorial at http://www.eclipse.org/webtools/jsf/docs/tutorial/JSFTools_1 _0_tutorial.html.
It needs to be updated for some minor UI changes, but demonstrates how to
create a JSF library. If you add the library to an existing project, also
ensure that you right-click on the project properties, go to J2EE Module
Dependencies and ensure the libraries are checked for deployment. (Note
the property dialog is called Java EE Module Dependencies if you are
working with a newer version).
> Could someone explain why Eclipse doesn't help me put together a JSF
> project (when NetBeans makes it PERFECTLY transparent and a no-brainer)
> and, therefore, how a JSF project is built in Eclipse.
We do provide help in the New Dynamic Web Project if you select our facet.
Our facet install page lets you customize what runtime, additional jars
and some basic web.xml configurations will be used. This is also shown in
the tutorial.
> I have read and attempted a couple of on-line tutorials on JSF and
> Eclipse. They don't work and break down part-way through the exercise.
Can you point me to these tutorials so I can try and get them corrected?
Regards,
Cameron]]>Cameron Bateman2008-05-20T20:15:15-00:00Re: JSF and Eclipse aren't the best of mates
https://www.eclipse.org/forums/index.php/mv/msg/68218/214169/#msg_214169
> Hi Russ,
>
>
>> project, choosing Preferences, then Java Build Path->Libraries. There
>
> Please see the JSF tutorial at
> http://www.eclipse.org/webtools/jsf/docs/tutorial/JSFTools_1 _0_tutorial.html.
> It needs to be updated for some minor UI changes, but demonstrates how
> to create a JSF library. If you add the library to an existing project,
> also ensure that you right-click on the project properties, go to J2EE
> Module Dependencies and ensure the libraries are checked for deployment.
> (Note the property dialog is called Java EE Module Dependencies if you
> are working with a newer version).
>
>> Could someone explain why Eclipse doesn't help me put together a JSF
>> project (when NetBeans makes it PERFECTLY transparent and a
>> no-brainer) and, therefore, how a JSF project is built in Eclipse.
>
> We do provide help in the New Dynamic Web Project if you select our
> facet. Our facet install page lets you customize what runtime,
> additional jars and some basic web.xml configurations will be used.
> This is also shown in the tutorial.
>
>> I have read and attempted a couple of on-line tutorials on JSF and
>> Eclipse. They don't work and break down part-way through the exercise.
>
> Can you point me to these tutorials so I can try and get them corrected?
>
>
> Regards,
>
> Cameron
Cameron,
Thanks for your reply. (Okay, not a genealogy forum, so I won't ask ;-)
Yes, this tutorial was in fact the best one and the one on which I had
founded my hopes. I did this some three or four weeks ago already, and
all went fine until I started to type in the login and welcome JSPs. I
started getting red flags at that point. There were a couple of
important typos which I corrected. At the time, it was my first foray
into JSF and I was completely in the fog. Now, however, I have done
this a bit (albeit in NetBeans) and would probably have a lot more clues,
so I need to try this again. Probably in a day or two with my present
schedule. I'll keep perfect notes on what happens so that I can
communicate anything useful to you.
Yeah, I would have thought that if my bean compiled cleanly, the 3 JSPs
correct (as demonstrated using NetBeans and later deployed to my
production server) and the web.xml done right, this should work. However,
only today I discovered that the sample app I wrote and ported from
NetBeans back to Eclipse (I insist on conquering Eclipse over this
matter) suffers from a practice I got out of G&H: Core JavaServer Faces
and isn't much used anymore (url-pattern*.faces in place of /faces/*).
So, that might be a problem too.
Now, are you telling me a JSF app practically cannot be done by hand in
Eclipse and that I must use a Dynamic Web Project? That's what I used,
but at the point at which (in the tutorial) I was supposed to create
the library, I didn't have the files, so I finished creating the
project and went back to create them via Preferences->Java Build
Path->Libraries.
Second, don't the JARs need to find their way down under
WebContent/WEB-INF/lib? Eclipse didn't put them there, so I tried
it, but this didn't help.
I'll try this tutorial again now that I'm not so clueless and let
you know.
Thanks,
Russ Bateman]]>Russell Bateman2008-05-22T05:00:23-00:00Re: JSF and Eclipse aren't the best of mates
https://www.eclipse.org/forums/index.php/mv/msg/68218/214235/#msg_214235
> Hi Russ,
>
>
>> project, choosing Preferences, then Java Build Path->Libraries. There
>
> Please see the JSF tutorial at
> http://www.eclipse.org/webtools/jsf/docs/tutorial/JSFTools_1 _0_tutorial.html.
> It needs to be updated for some minor UI changes, but demonstrates how
> to create a JSF library. If you add the library to an existing project,
> also ensure that you right-click on the project properties, go to J2EE
> Module Dependencies and ensure the libraries are checked for deployment.
> (Note the property dialog is called Java EE Module Dependencies if you
> are working with a newer version).
>
>> Could someone explain why Eclipse doesn't help me put together a JSF
>> project (when NetBeans makes it PERFECTLY transparent and a
>> no-brainer) and, therefore, how a JSF project is built in Eclipse.
>
> We do provide help in the New Dynamic Web Project if you select our
> facet. Our facet install page lets you customize what runtime,
> additional jars and some basic web.xml configurations will be used.
> This is also shown in the tutorial.
>
>> I have read and attempted a couple of on-line tutorials on JSF and
>> Eclipse. They don't work and break down part-way through the exercise.
>
> Can you point me to these tutorials so I can try and get them corrected?
>
>
> Regards,
>
> Cameron
Now, mind you, I see "missing" written all over this last image, but I
swear to you that I just now redid SUN-RI and JSTL with JARs that very
much do exist in a subfolder I created in my workspace (and, the old
places I had gotten them from existed and still exist too, yet I rebuilt
them precisely because Eclipse said, "missing"). Clearly, Eclipse is
doing something after I create the libraries to render them invalid. If
I'm supposed to put them somewhere special, let the tutorial or Eclipse
(or both of them) plainly state that.
Does this show you what's going on? What I've done wrong?
Russ]]>Russell Bateman2008-05-23T22:20:54-00:00Re: JSF and Eclipse aren't the best of mates
https://www.eclipse.org/forums/index.php/mv/msg/68218/214403/#msg_214403
is still known, but the jar(s) that it points to no longer do. Best thing
to do would probably be to delete the containers marked "missing" and
create new ones.
Rather than using User Libraries for your JSF libraries, try using the JSF
Library feature (this is shown in the Register JSF Libraries portion of
the tutorial). Once you have created the JSF library containers, also
open Project->Properties...->J2EE Module Dependencies (it is called Java
EE Module Dependencies in a new builds) and ensure that they are checked
for deployment. Checking them in the Module Dependences will
automatically cause the jars to be copied to your WEB-INF/lib when you
launch the server.
The compile time (user libraries or JSF Libraries) has been intentionally
made separate from runtime (i.e. using J2EE Module Dependencies or
manually copying to WEB-INF/lib), since larger applications sometimes have
system libraries that are always present, so not every application needs
them at in the deployed war/ear but they are still needed at compile time
to get a build.