3 Replies Latest reply on Mar 30, 2006 4:47 PM by Andrew Davey

    Content caching

    Andrew Davey Newbie

      Hi,

      Not sure if this post should go in this forum or not but since my application is using JBoss Portal I'll post here.

      Versions:
      JBoss AS4.0.3SP1
      JBoss Portal 2.2.1-RC2
      Firefox 1.5
      IE 6.0

      Symptoms:
      I have a JSP and a servlet that displays binary data (images) retrieved from a database. The JSP contains an img tag that has the source set to point at the servlet.

      <img name="uniqueName" id="uniqueName" src="servletURL" />
      

      When I retrieve and display the first image thinks are ok. I then retrieve and display another image and the first image is displayed until I hit F5 to refresh the page in the browser.

      What I have tried:
      In the JSP:
      response.setHeader("Cache-Control","no-cache");
      response.setHeader("Pragma","no-cache");
      response.setDateHeader("Expires", 0);
      giving the image a uniqueName

      In context.xml of:
      jboss-portal.sar\portal-server.war\WEB-INF
      jbossweb-tomcat55.sar
      myApplication.war\WEB-INF

      <Context cachingAllowed="false">
      </Context>
      


      Can anyone help me with this caching problem? I don't know what else to try.

      Thanks.