[
http://issues.apache.org/jira/browse/MYFACES-908?page=comments#action_12363376
]
Daniel Lefevre commented on MYFACES-908:
----------------------------------------
To allow the reverse proxy to change dynamically the path, it should be given
in an element modified by the proxy, such as a href.
I solved it as follows:
in the header of all the pages, the generated script:
<script type="text/javascript"><!--
myThemeOfficeBase='/myApp/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/';
//--></script>
can be removed and replaced by (don't know how to generate that, I think the
classes HtmlJSCookMenuRenderer.java and AddResource.java should be enhanced):
<a id="jscookmenuResource" name="jscookmenuResource" style="visibility:
hidden;"
href="/myApp/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/"
>a</a>
In the file theme.js, the following code:
if(myThemeOfficeBase)
cmThemeOfficeBase = myThemeOfficeBase;
can be replaced as follows:
if(document.getElementById('jscookmenuResource'))
cmThemeOfficeBase = document.getElementById('jscookmenuResource');
Then it works fine.
> jscookmenu: images do not appear
> --------------------------------
>
> Key: MYFACES-908
> URL: http://issues.apache.org/jira/browse/MYFACES-908
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Environment: acces application from the web via a reverse proxy
> Reporter: Daniel Lefevre
> Priority: Minor
>
> When using jscookmenu, the generated javascript uses a relative reference for
> the value of the myThemeOfficeBase variable:
> var
> myThemeOfficeBase='/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/';
> This causes images to not appear when accessing the application via a reverse
> proxy.
> An absolute reference should be used instead, as for the js files references:
> myThemeOfficeBase='https://myserver/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/';
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira