8 Replies Latest reply on Jun 25, 2013 9:31 AM by jaikiran

    Cached Static File?

    tbellmer

      Using JBoss 4.2.3 and put out a static HTML file and then updated it.  Shows old version of the static file.  Restarted Jboss a few times and still shows old version.  I rarely do this stuff so want the simplest solution to this issue.

        • 1. Re: Cached Static File?
          houseclearance

          It seems like you may need to change JBoss version from 4.2.3 to 7. If you want an updated cached static file.

          • 2. Re: Cached Static File?
            jaikiran

            It should work fine even in 4.2.3.

             

             

            Tom Bellmer wrote:

             

            Using JBoss 4.2.3 and put out a static HTML file and then updated it.  Shows old version of the static file.  Restarted Jboss a few times and still shows old version.

            Where did you put that static file? How did you update it? How are you accessing it to see whether it's new content or old?

            • 3. Re: Cached Static File?
              jfclere

              See http://docs.jboss.org/jbossweb/2.1.x/config/context.html (the TTL is 5 seconds) it should work with 4.2.3

              try to cachingAllowed="false" and see if it helps (note that just to test don't use for a long time in production).

              • 4. Re: Cached Static File?
                tbellmer

                Static file is located here:  E:\jboss-4.2.3.GA\server\SASServer1\deploy\jboss-web.deployer\ROOT.war\files\html\lrp\ and is named lrpdaily.html.  It is from a Visio 2010 diagram that is saved as a web page.

                 

                When I go to that folder and open that file it reflects the latest version.  However, when I use my link to the web page as in http://rmapp08f.app.rm.usda.gov:8080/files/html/lrp/lrpdaily.html it is showing the old (last year) version.

                 

                Pretty frustrating that even shutting down JBoss and the file does not clear and get reset.

                 

                I do not use JBoss or know much about it at all.  I looked for the context.xml file and see it in the following folders:

                 

                e:\jboss-4.2.3.GA\server\all\deploy

                e:\jboss-4.2.3.GA\server\default\deploy

                e:\jboss-4.2.3.GA\server\SASServer1\deploy

                 

                Here is the contents of the context.xml from the SASServer1 folder (I am using Jboss from SAS so this is the most likely folder)

                 

                <!-- The contents of this file will be loaded for each web application -->

                <Context cookies="true" crossContext="true">

                <!-- Session persistence is disable by default. To enable for all web

                apps set the pathname to a non-empty value:

                <Manager pathname="SESSIONS.ser" />

                To enable session persistence for a single web app, add a

                WEB-INF/context.xml

                -->

                <Manager pathname="" />

                <!-- Install an InstanceListener to handle the establishment of the run-as

                role for servlet init/destroy events.

                -->

                <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>

                 

                </Context>

                 

                 

                So do I just add in a cachingAllowed="false" somewhere in the context.xml file then stop and start Jboss?

                 

                Sorry this is definetely not even remotely anything I am familiar with but I really do appreciate the assistance provided from this message board!

                • 5. Re: Cached Static File?
                  jaikiran

                  Tom Bellmer wrote:

                   

                  Static file is located here:  E:\jboss-4.2.3.GA\server\SASServer1\deploy\jboss-web.deployer\ROOT.war\files\html\lrp\ and is named lrpdaily.html.  It is from a Visio 2010 diagram that is saved as a web page.

                   

                  When I go to that folder and open that file it reflects the latest version. 

                  Are you sure that's where you should be updating the file and not in some other profile which is being used? i.e. are you sure e:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\ROOT.war\files\html\lrp\ isn't the profile being used? How do you start the server? What's the command?

                  • 6. Re: Cached Static File?
                    tbellmer

                    I did a search of the entire drive looking for any and all references to the lrpdaily.html file and the only location is as follows:  E:\jboss-4.2.3.GA\server\SASServer1\deploy\jboss-web.deployer\ROOT.war\files\html\lrp\

                    • 7. Re: Cached Static File?
                      tbellmer

                      As for starting and stopping Jboss, I am running Windows 2008 and just use the Services, scroll down to JBoss - SASServer1 then right mouse click and select Start or Stop

                      • 8. Re: Cached Static File?
                        jaikiran

                        Tom Bellmer wrote:

                         

                        As for starting and stopping Jboss, I am running Windows 2008 and just use the Services, scroll down to JBoss - SASServer1 then right mouse click and select Start or Stop

                        I think you should check with whoever setup that server instance to know where exactly the server files are located and which profile is being used. I think you are updating the wrong location and the changes aren't being picked up.