you mean the "src" should point to a servlet to get the image?

because what i did was, i just let src point to the image directory
right away.

   ex. <img src="\stat_image\stat.png">

Mathias Hoggren wrote:
Hi!

The HTTP-headers you're setting only affects the HTML-page itself, the
inline images are fetched in a separate request and you'll have to set
theese headers in the jsp/servlet that creates the image too.

There is another way though, you could append a random string to the URL in
the img-tag. This way the browser doesn't recognize the filename and it will
not try to read it from it's cache. The string can be anything as long as
it's unique for the request.

<img
src="/myimgservlet?param1=value1&param2=value2;<%=System.currentTimeMillis()
%>" width=...>

Brgds
Mathias


-----Ursprungligt meddelande-----
Fran: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:SERVLET-INTEREST@;JAVA.SUN.COM]For randie ursal
Skickat: den 13 november 2002 07:12
Till: [EMAIL PROTECTED]
Amne: NO CACHE on RESPONSE


hi list,

  i tried to place this into one of my JSP page that i want to disable
cache, cause i have an image that is created dynamically. the problem is
when i access my web server, the browser displays HTTP 404 error or File
not found.

<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy
server
%>


   has anyone have any idea on this? i use IE6.0 and my TOMCAT is
running on Solaris 8.0 machine.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html



--

Randie V. Ursal
Design Engineering Department
NEC Telecom Software Philippines, Inc.
office : +63(032) 233-9142 (loc.3119)
mobile : +63(0917) 467-8244
email  : [EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to