0

I develop a web app:

  • frontend javascript
  • transport json
  • backend Java EE
  • JBoss AS 6.1

All static html and js files are in an exploded .war directory which itself is in an exploded .ear directory.

Normally everything works fine! Today I changed a html file and copied it to the .war directory.

When the browser loaded the file it was the old one. So I started wireshark and saw in wireshark the get request and the returned OLD file, even when I changed the filename in the .war directory.

So there is some caching in jboss. I started Googling and found some posts about the tmp and work folders.

I looked in my "...\server\default\work..." folders, but everything was empty.
In "...\server\default\tmp" I found some files but no one seems to be related to my cached page.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Wolfgang Adamec
  • 8,374
  • 12
  • 50
  • 74

2 Answers2

1

As this is a tomcat-in-jboss issue, you have to go to the tomcat area in jboss. In my case ..\server\default\deploy\jbossweb.sar. In this directory you should find a file called context.xml.

Now stop jboss.

In the context tag there are 2 attributes - cookies and crossContext. Now just add the attribute cachingAllowed="false" and start jboss again:

<Context cookies="true" crossContext="true" cachingAllowed="false">
Lukasz Stelmach
  • 5,281
  • 4
  • 25
  • 29
Wolfgang Adamec
  • 8,374
  • 12
  • 50
  • 74
0

If you need only one time solution, just create fresh ear with fixed HTML file, undeploy the old one and deploy the new one.

alexsmail
  • 5,661
  • 7
  • 37
  • 57