Hello all: I am having big trouble with the firewall proxy server. My system seems to be working ok when the proxy server is disabled. Can someone please help??!!! I know proxy server tends to cache the pages and replay them, I do not want this feature. So I used the following code: but it will not work, why? For all JSP page I am working: I add ( I do not need to set the header on the HTML part of the JSP page right?) <HTML> <%@ page session="true" %> <% response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); %> <HTML> for all html page, I add <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> But my system is still not working well with the proxy (seems like some problem with the session). When I disable proxy, it works ok. What did I do wrong? For setting the header, is there a restriction on where I put the setHeader code? (Like between <Head> , or <Body>??) I am so confused, can someone help? Thanks
well.. the headers cannot be set after the response buffer is flushed, so make sure your response.setHeader() calls are *among the first* things you do on your JSP.
Regarding the whole META tag no-cache thing. This is a perennial topic at the Ranch. MANY people seem to have trouble with caching, and I suspect it's because browsers and browser *versions* all implement caching in a (at least somewhat) broken way. Then you add on the proxy, which may have 'slightly broken' caching. And to top it off, perhaps your webserver is doing something odd.
Regarding session trouble: does your webproxy filter out cookies? sessions require a cookie, unless you've enabled URL Rewriting. [ February 11, 2002: Message edited by: Mike Curwen ]
Joined: Oct 09, 2001
Hello: Thanks for the answer. As you mentioned, there are many possible causes. Now my problem is that I do not konw which one is causing the trouble, proxy, cache, or my tomcat server. But I find that when I disable the proxy server to use the system, it seems to be working fine, and I think the proxy is using cookies. It is a intranet system, so I wonder if I can ask my client to disable the proxy while using the system?? maybe I should try to talk to my client if I can not figure out what is going wrong..
subject: Urgent! use setHeader will not work for my proxy server