• Post Reply Bookmark Topic Watch Topic
  • New Topic

Overseas Caching?  RSS feed

 
Joe McIntyre
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:

I have Tomcat running on a server that I think might be in Europe somewhere. I'm in the western United States. I'm having a lot of problems developing with the server because when I update a JSP page, the server seems to compile the new page, but browsers keep displaying outdated pages. I've tried everything - restarting Tomcat, browsing with both Explorer and Netscape, clearing browser caches, restarting browsers, plus putting the following in the JSP pages:

<% response.setHeader("Pragma","no-cache");%>
<% response.setHeader("Cache-Control","no-store");%>
<% response.setDateHeader("Expires",-1);%>

So here's my question - if it's true the server is in Europe, maybe there's some kind of intermediate caching on the internet somewhere so the query doesn't have to go all the way across the ocean each time.

Anybody have any suggestions? Thanks.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible that your ISP or corporate IT department has installed a proxy server that ignores no-cache tags (which is perfectly legal, they're not official standards).

We've had problems with that ourselves on several projects. Where the server is is completely irrelevant in this, all that matters is what your proxy is doing.

It's also possible that your server, being in a different timezone, doesn't see the files as changed because the compilation timestamp on the old version may be later?
 
danny liu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wally:

Sometimes Tomcat have problem to recompile the jsp pages.

If you can access the tomcat server in Europe, what you can do are:

a. go to \TomcatHome\work\catalina\localhost\yourapplication
b. delete that jsp code (both .java and .class)


Since no jsp code exists, when next time users access that jsp page, it must be recompiled.

Dan
 
Joe McIntyre
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Danny! You were right... it wasn't recompiling the jsp pages.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!