Markus, Im using Tomcat 5.5.17. I assumed that my browser would send the If-Modified-Since Request-Header and have tried your jsp page and it does. What I am doing is serving images from a database. Here is what I am doing in my spring controller... protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { Enumeration headers = httpServletRequest.getHeaderNames(); while ( headers.hasMoreElements()) { String header = (String)headers.nextElement(); System.out.println( header + " : " + httpServletRequest.getHeader(header) ); } final String url = httpServletRequest.getRequestURI(); final String imageName = url.substring(url.lastIndexOf("/")+1).toLowerCase(); Long imageId = Long.parseLong(imageName.substring(0, imageName.lastIndexOf("."))); mIImageRepository.streamImage(imageId, httpServletResponse.getOutputStream()); httpServletResponse.setDateHeader("Last-Modified", new Date().getTime()); return null; } This is the output i get the first time the page is called... host : 192.168.6.194:8080 user-agent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 accept : image/png,*/*;q=0.5 accept-language : en-us,en;q=0.5 accept-encoding : gzip,deflate accept-charset : ISO-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive : 300 connection : keep-alive referer : http://192.168.6.194:8080/catalog-1.0-SNAPSHOT/admin/editCategory.html?categoryId=1 cookie : JSESSIONID=AB7DD26B34FCAEA604B904B275C03BAD And this is the output i get on the next call.. host : 192.168.6.194:8080 user-agent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 accept : image/png,*/*;q=0.5 accept-language : en-us,en;q=0.5 accept-encoding : gzip,deflate accept-charset : ISO-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive : 300 connection : keep-alive referer : http://192.168.6.194:8080/catalog-1.0-SNAPSHOT/admin/editCategory.html?categoryId=1 cookie : JSESSIONID=AB7DD26B34FCAEA604B904B275C03BAD cache-control : max-age=0 Regards Ben On 9/5/06, Markus Schönhaber wrote: > ben short wrote: > > I have tried with firefox and ie6. May i ask what you are using? > > Firefox. > May I ask what you are using (i. e. Tomcat version)? > > You didn't answer my question: Does your browser send an If-Modified-Since > Request-Header? > > On Tomcat 5.5.17 calling this JSP *twice* will cause IE 6 and FF 1.5.0.6 to > send an If-Modified-Since header line on the second attempt. And the JSP will > display it. > > ---------- snip ---------- > > <%@page contentType="text/html"%> > <%@page pageEncoding="UTF-8" session="false" import="java.util.*"%> > "http://www.w3.org/TR/html4/loose.dtd"> > > > > > Request Headers > > >

Request Headers

> > > > > <% > response.addDateHeader("Last-Modified", new Date().getTime()); > for(Enumeration headerNames = request.getHeaderNames(); > headerNames.hasMoreElements();) > { > String headerName = (String) headerNames.nextElement(); > String headerValue = request.getHeader(headerName); > %> > > > > > <% > } > %> >
Header NameHeader Value
<%= headerName %><%= headerValue %>
> > > > ---------- snap ---------- > > Regards > mks > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org