-
1. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
healeyb Dec 26, 2011 7:05 PM (in response to kldavis4)Can you post the relevant parts of your web.xml? I seem to have the same problem, it would be
interesting to compare notes, as it were.
Regards,
Brendan.
-
2. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
kldavis4 Jan 4, 2012 5:26 PM (in response to healeyb)I believe all that I have changed is adding the resource servlet:
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
...
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/org.richfaces.resources/*</url-pattern>
</servlet-mapping>
and adding this context param:
<context-param>
<param-name>org.richfaces.resourceMapping.enabled</param-name>
<param-value>true</param-value>
</context-param>
-
3. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
lfryc Jan 5, 2012 7:08 AM (in response to kldavis4)Hi Kelly, could you please provide us with small sample for reproduction?
It should contain as few components as required for reproduction,
possibly don't dependent on your bussiness model (backing beans, etc.).
-
4. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
mcmurdosound Jan 5, 2012 7:33 AM (in response to lfryc)No problems here. I've used your changes to the web.xml and created the following example:
<h:form>
<a4j:commandLink value="testLink" render="output123">
<f:setPropertyActionListener target="#{demoManager.testString}" value="hello world"/>
</a4j:commandLink>
<h:outputText value="#{demoManager.testString}" id="output123"/>
</h:form>
RF 4.1.0.Final
jboss 7.0.2.Final
jdk 1.6.0_27
firefox 8.0 and ie9
-
5. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
healeyb Jan 5, 2012 9:23 AM (in response to mcmurdosound)Interesting that Christian has this working on jboss, I'd guess that's what RF 4.1 has been primarily tested
on. Which app server are you using Kelly? I seriously can't get it working on glassfish 3.1.1, but whether
or not that is a relevant factor I wouldn't want to say at this stage. I'll try and free up some time to investigate.
-
6. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
mcmurdosound Jan 5, 2012 9:36 AM (in response to healeyb)maybe my example isn't quite right, but I've managed to run it on glassfish as well.
GlassFish Server Open Source Edition 3.1.1 (12)
Mojarra 2.1.3 (FCS b02)
-
7. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
healeyb Jan 5, 2012 11:41 AM (in response to mcmurdosound)Running with the javascript console I get an error on line 2883 of packed.js "jsf is not defined", which means
I think that javax.faces/jsf.js isn't being included. I manually added it to my template page with h:outputScript
but it seems to mess up my jquery ui import, strangely.
Next up is that packed.css is returning a 404:
/4.1.0.Final/PackedCompressed/myskin/packed/packed.css&v=23
A couple of things to note:
- I'm using ssl
- I've defined a org.richfaces.skin context param which is "myskin"
- my app has a custom resource handler, hence the &v=23. This is to allow me to enforce browser cache
refreshes when I deploy new versions, if I want to.
I've tried not using a custom skin and turning off the custom resource handler, but to no avail. I wonder why
you're not seeing these problems? It's really quite a lot of hassle to turn off the container security, I wonder...
-
8. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
kldavis4 Jan 6, 2012 9:03 AM (in response to lfryc)I will try to put a test case together
-
9. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
kldavis4 Jan 6, 2012 9:04 AM (in response to healeyb)I am using jetty 6.1.x
-
10. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
healeyb Jan 6, 2012 10:37 AM (in response to kldavis4)Kelly & Christian, are you using prefix or suffix mapping?
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
OR (for example)
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Christian, would you be able to spare a moment to post the resource url for packed.css from your environment
obtained from firebug or dev tools? I suppose in my environment either the requested location is wrong or the
requested resource is missing for some reason.
Thanks,
Brendan.
-
11. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
kldavis4 Jan 6, 2012 10:40 AM (in response to healeyb)I am using suffix mapping:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
-
12. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
healeyb Jan 6, 2012 10:46 AM (in response to kldavis4)So do I. I'm going to guess that Christian is using prefix mapping...
-
13. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
lfryc Jan 6, 2012 11:06 AM (in response to healeyb)Hey Brendan,
you are probably running into
https://issues.jboss.org/browse/RF-11739
Could you try workaround mentioned there?
-
14. Re: RF 4.1.0.Final - javascript error when resource mapping enabled
lfryc Jan 6, 2012 11:13 AM (in response to kldavis4)Just note that resource mapping strongly depends on ordering of resources.
I need your help to determine, if there are no problems with ordering then.
Simply passing your XHTML should help for reproduction.