Hi,
I think this is the right place to ask, as I'm also having problems with the
resources.
I'm using Glassfish V2.1, Trinidad 1.2.12, MyFaces 1.2.8 and Facelets. My
pages get displayed but as soon as it gets to showing images or accessing
the stylesheet file these aren't found.
A snippet from my faces-config:
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>trinidad</filter-name>
<!-- This assumes that the FacesServlet has been registered -->
<!-- under the name "faces" -->
<servlet-name>faces</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
<param-value>org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS</param-name>
<param-value>.xhtml</param-value>
</context-param>
trinidad-config:
<?xml version="1.0"?>
<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
<!-- Enable debug output -->
<debug-output>true</debug-output>
<accessibility-mode>default</accessibility-mode>
<skin-family>vkb</skin-family>
</trinidad-config>
and trinidad-skins:
<?xml version="1.0" encoding="ISO-8859-1"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<skin>
<id>vkb.desktop</id>
<family>vkb</family>
<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
<style-sheet-name>theme/stylesheet.css</style-sheet-name>
</skin>
</skins>
I was using exact the same configuration on a Websphere App Server and there
everything worked fine. The only error message I get now when calling a page
is:
SEVERE: Could not load style sheet: theme/stylesheet.css
SEVERE: java.io.FileNotFoundException: Unable to locate style sheet
"theme/stylesheet.css" in local styles directory
(C:\Programme\GlassfishV2\domains\domain1\generated\jsp\j2ee-apps\ZVD_VS_EAR\ZVD_VS_WEB_war\adf\styles),
or on the class path.
I also added the sun-web.xml when I found this thread to tell the Glassfish
that I'm using MyFaces but this didn't change anything.
Anybody an idea why resources aren't working here?
Simon
--
View this message in context:
http://old.nabble.com/-Trinidad--Trinidad-and-Glassfish%3A-resource-servlet-does-not-work-tp26873419p27140871.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.