Jahia DX > Problems with multi...

0 (0 Good)
0 (0 Bad)

Problems with multi channel rendering with application-renderer.xml

by  mrgreg »  2012/05/10 13:42


We've been using application-renderer.xml to provide targeted content to mobile devices but it seems like changes to the xml file have no effect. Initially things seemed to work well and mobile content was served. However when we tried to modify application-renderer.xml we found changes seemed to have no effect. As part of several experiments I tried the following (to redirect firefox to mobile content);


<?xml version="1.0" encoding="UTF-8"?>
<bean class="org.jahia.services.render.filter.UserAgentFilter">
        <property name="priority" value="6" />
        <property name="applyOnModes" value="live,preview" />
        <property name="applyOnConfigurations" value="page" />
        <property name="userAgentMatchingRules">
                        <entry key=".*Fire.*" value="iphone" />
but it had no effect. We suspected that an old version of the file may be cached to tried; emptying the tomcat/work folder, flushing all caches in the editor & restarting the appserver but this made no difference.
Any idea what the problem could be?


Number of messages  1
Registration date
0 (0 Good)
0 (0 Bad)

Re: Problems with multi channel rendering with application-renderer.xml

by  andysaunders »  2012/06/07 09:29

A few problems in the documentation:

1) It doesn't mention that the example shown is straight from the default configuration which is hidden away in jahia jar file. To override the default settings you need to change the priority value to something higher than the default. Changing it to 5 worked for us.

2) It needs to be in a file named Jahia_xCM_v6.6.0.0/tomcat/webapps/ROOT/WEB-INF/etc/spring/servlet-applicationcontext-renderer.xml

We got it working by doing the following:

1) Copy the applicationcontext-renderer.xml file from the Jahia_xCM_v6.6.0.0/tomcat/webapps/ROOT/WEB-INF/lib/jahia-impl- into Jahia_xCM_v6.6.0.0/tomcat/webapps/ROOT/WEB-INF/etc/spring/servlet-applicationcontext-renderer.xml

2) Edit the <bean class="org.jahia.services.render.filter.UserAgentFilter"> priority value to 5 (or something less than it already is.) i.e. :

<property name="priority" value="5" />


Number of messages  1
Registration date

by  faissah »  2012/06/15 15:40


Sorry for those issues in the documentation. I am currently working on updating it.

Thank you very much for your feedbacks and taking the time explain precisely what are the issues. I really appreciate it.

Best Regards,


Fabrice  (faissah)

Number of messages  262
Registration date

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page