javaweb-people
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javaweb-people] mime types for the GNU java platform


From: Nic Ferrier
Subject: [Javaweb-people] mime types for the GNU java platform
Date: 23 Mar 2002 22:03:03 +0000

I've just been polishing up Paperclips' mime handling stuff.

Here's how I do things at the moment:

o the web server asks the servlet API interface what the MIME type of
  a particular file is.

o the servlet API implementation uses it's own list of MIME types

o the list of MIME types is created from one or many sources:

  - local directory file "mime.types"
  - jar files META-INF/mime.types
  - {java.home}/lib/mime.types
  - {user.home}/.mime.types


In other words, Paperclips doesn't bother to ask the file handler for
the mime type it is supplying.

That's kinda lucky because the Classpath implementation of URLHandler
doesn't only supplies MIME types from a static list it has in the
class itself.


I'm wondering whether it would be a good idea to have more
comprehehsive MIME handling through a better MIME FileNameMap. Then
Paperclips could just ask the FileNameMap.

ClasspathX has a JAF implementation, part of which could be adapted to
serve this purpose. The implementation works exactly the same as the
registry specified above (I copied it for Paperclips).

Does anybody have any ideas about the best way to add this to the
multiple GNU projects?

Are there extra requirements that would be nice for you core library
guys? (Classpath and GCJ) For example, might you want java lib or
user home seraching turned off for embedded environments?


Nic




reply via email to

[Prev in Thread] Current Thread [Next in Thread]