MyEclipse: My Eclipse and JSF 2.0 resources folder

clairesimpson - Nov 10, 2009 - 11:32 AM
Post subject: My Eclipse and JSF 2.0 resources folder
Hello

I have been trying to run some example jsf 2.0 code in myEclipse Blue 7.5 by creating a web project and copying JSF 2.0 jar files jsf-api.jar and jsf-impl.jar into the WEB-INF directory. All is going well except that a new JSF 2.0 feature where I should be able to drop resource files e.g. .css and image files in a resources folder placed under WebRoot or META-INF is not working. This is what the JSF 2.0 spec says

"The default implementation will look for resources in two locations
and in the following order:
/resources this location represents resources in the webapp itself
and if present, must be in the root of the web application

/META-INF/resources this location represents resources on the
classpath "

I have tried WebRoot and META-INF without any luck and was wondering if anyone has managed to get this feature to work?

Thanks!
Support-Brian - Nov 11, 2009 - 01:16 PM
Post subject:
Claire,

If I understand you correctly, you have placed resources in a "resources" folder which in turn is under your project's "WebRoot" folder, correct? (And also under WebRoot/META-INF)

Can you give me some idea of how the resources (in the resource folder) are referenced in your JSF application?
clairesimpson - Nov 11, 2009 - 02:02 PM
Post subject:
Hi Brian

I have just figured it out. My project name had spaces in it which stopped the functionality from working. I changed the name to one without spaces and Voila! it started to work. Thanks for the reply!
support-joy - Nov 12, 2009 - 10:08 AM
Post subject:
Good to hear you are all set.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits