tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Viaud <cedric.vi...@matrasi-tls.fr>
Subject Pb with HEAD request
Date Tue, 26 Nov 2002 15:32:45 GMT
Hi,

I have Tomcat server 4.0.4 on NT 4 that contains a servlets in charge to create SVG content.

The client is Internet Explorer 5.5. It loads the following simple HTML page :

<html>
<body>
<embed width="200" height="200" src="http://localhost:8080/myContext/MyServlet>
</body>
</html>

The problem is that my servlet is invoked twice.

My supposition is that IE is sending a HEAD (or GET) request to know the content type of the
URL and then run the Adobe SVG plugin. When started the plugin connects also the servlet to
get SVG content. HTTP spec says that HEAD request must return the same headers as GET request.
What is sure is that my code is executed twice, not only the part that concerns response headers.
But how can I do to know with the servlet if the request is a GET or a HEAD. I test the HttpRequest.getMethod()
but it always return "GET".

Does someone know how to "configure" tomcat or anything else to avoid the two executions ?

Thanks.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message