tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chiang <alan.chi...@gmail.com>
Subject Prevent the Default Servlet from piggybacking data
Date Thu, 26 May 2005 00:55:55 GMT
Greetings all,
I have attempted to scour the list for this problem, but I haven't been able 
to find it. This is a special case where I need Tomcat to serve MIDlets.

When a handset downloads a JAD file, it processes the file and locates the 
corresponding JAR file. It will then proceed to download the JAR file. I am 
using a servlet to serve the JAR files, which seems to work. 

My problem is getting the Default servlet to properly serve the JAR files. I 
have performed some captures of the packets running through and came to this 
possibility: Apache and Weblogic do not piggyback the data in the "HTTP 200 
OK" packet while Tomcat does. So my question is: Is it possible to control 
how the Default Servlet returns data, is there another servlet, or can a 
filter be created to prevent data from being piggybacked into the response? 
Or is there a header one can use?

>From weblogic:
Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Date: Wed, 25 May 2005 23:12:39 GMT\r\n
Pragma: no-cache\r\n
Server: WebLogic Server 7.0 SP4 Tue Aug 12 11:22:26 PDT 2003 284033 \r\n
Content-Length: 76816\r\n
Content-Type: application/java-archive\r\n
Expires: Thu, 01 Jan 1970 00:00:00 GMT\r\n
Cache-Control: no-cache, no-transform, must-revalidate\r\n
\r\n
---------------------
>From Tomcat:
Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Date: Tue, 24 May 2005 19:29:06 GMT\r\n
Server: Apache\r\n
Cache-Control: no transform, no cache\r\n
ETag: W/"151920-1116513093000"\r\n
Last-Modified: Thu, 19 May 2005 14:31:33 GMT\r\n
Content-Type: application/java-archive\r\n
Content-Length: 151920\r\n
\r\n
Media Type: application/java-archive (1207 bytes)

-----
Notice that Tomcat uses this to append the JAR file. The Server: Apache line 
is included because I'm using mod_jk2

Thanks all!

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