Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Content-type for JAR Files?  RSS feed

 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Report post to moderator
I can't believe it.
mycgiserver.com, a JAVA server (free) service is serving the JAR (Java Archive) files with Content-Type: text/plain !!!
This is what the program that I wrote returns for a JAR file in said server:

Is anyone here a Java server admin that can tell me what is the convention to use (before I go to Sun's site and look for a JAR file!) I will then report the bug to mycgiserver.com.
Needles to say, some browsers will try to display the JAR file as text on the screen, producing garbage as expected. I want the File/Save dialog box to appear instead, as it does with ZIP files, which is how I have been getting around the problem. I am just tired of having to rename *.JAR to *.ZIP as workarounds.
I expect that ignorance from say, GeoCities.com but not from a JAVA service!
Thanks!
PS: The Content-Type: for a ZIP file from that server is application/zip.
[ May 18, 2002: Message edited by: Tony Alicea ]
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Report post to moderator
The answer is (from Tomcat's web.xml):
<mime-mapping>
<extension>jar</extension>
<mime-type>application/java-archive</mime-type>
</mime-mapping>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!