Simon Kitching wrote:
Kevin wrote:
I replaced the MyFaces support that shipped with MyEclipse 4.0 with
MyFace 1.1.0.
It seems to work...more or less.
Here is a problem that I noticed.
I am trying to use jscookmenu which is part of Tomahawk.
My menu looks a little something like this:
<t:jscookMenu layout="hbr" theme="ThemeOffice">
<t:navigationMenuItem id="nav_1" itemLabel="Home"
action="#{navBacking.home}" />
Loading this up the first time, it works great (if you do everything
right of course).
However, when I make changes and save (which recompiles the JSP), I do
not see the changes. This is true even if I do a reload in the Tomcat
Web Application Manager.
Strangely though, if I remove the menu completely from the JSP, save
the JSP and reload it in the browser, then add it in again with the
changes, save, etc. I can then see the changes.
Example change = changing theme="ThemeOffice" to theme="ThemeMiniBlack"
I think I know why I am not seeing these changes.
If you do a View Source on a rendered JSP with a jscookmenu, you will
see something like this in the HTML header.
<script
src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/JSCookMenu.js"
type="text/javascript"></script>
<script
src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/MyFacesHack.js"
type="text/javascript"></script>
<script
src="/yourappname/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.js"
type="text/javascript"></script>
<link rel="stylesheet"
href="/hcrs/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11266487/ThemeMiniBlack/theme.css"
I believe that this "feature" is related ot the Apache MyFaces'
Extensions Filter:
http://myfaces.apache.org/tomahawk/extensionsFilter.html
So, I think it is caching the CSS and JavaScript files in memory and
not freeing them up when I recompile my JSP.
Does anyone have any experience with this problem or has anyone tried
out the jscookmenu under MyFaces 1.1.0 to confirm my suspicions?
In the URL
/yourappname/.../11266487/JSCookMenu.js
the numeric part is indeed a "cache key".
[nb: many lines removed from above thread]
Actually, on re-reading your email, while I think my previous comments
are correct I don't think they apply to your situation. You're not
having problems with changing theme files and getting the cached
version: you're having problems changing the theme specified in the jsf
tag and not seeing updated HTML.
Do you have something like this at the top of your JSP pages?
<head>
<meta content="no-cache" http-equiv="Cache-Control"/>
<meta content="no-cache" http-equiv="Pragma"/>
This is standard HTML stuff, not really anything related to JSF/JSP. If
you don't have this then a browser or web-proxy can cache the HTML pages.
Regards,
Simon