Hello =20
=20
I'm dealing successfully with the jscookmenu component when I work on
the test environments. But when I put the application in the production
environment, the jsCookMenu does not display the images anymore.=20
The difference is that the production environment is accessible via a
reverse proxy.=20
When I look into the generated page, I see the following:
=20
<head>
<script type=3D"text/javascript"
src=3D"https://myserver/myapp/faces/myFacesExtensionResource/org.apache.m=
y
faces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookm
enu.HtmlJSCookMenuRenderer/JSCookMenu.js"><!--
=20
//--></script>
<script type=3D"text/javascript"
src=3D"https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.ap=
a
che.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.j
scookmenu.HtmlJSCookMenuRenderer/MyFacesHack.js
<https://webgate.cec.eu.int/sigl2test/Sigl4/faces/myFacesExtensionResour
ce/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878
/navmenu.jscookmenu.HtmlJSCookMenuRenderer/MyFacesHack.js> "><!--
=20
//--></script>
<script type=3D"text/javascript"><!--
var
myThemeOfficeBase=3D/myapp/faces/myFacesExtensionResource/org.apache.myfa=
c
es.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu
.HtmlJSCookMenuRenderer/ThemeOffice/';
//--></script>
<script type=3D"text/javascript"
src=3D"https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.ap=
a
che.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.j
scookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.js
<https://webgate.cec.eu.int/sigl2test/Sigl4/faces/myFacesExtensionResour
ce/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878
/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.js> "><!--
//--></script>
=20
As you can see, all references are absolute, except the initialisation
of the myThemeOfficeBase variable which uses a relative reference to the
theme directory.=20
I think this is the reason of the problem. This reference should be made
absolute as the others and the images will then be rendered correctly,
even via a reverse proxy.
=20
Yours, Dan
|