E-Mail:
Get our new Windows 7 eBook (PDF) for $7 with 70+ Tips. Download Now!

Apache and Java MIME Types

  • No Related Post

A customer called me today, and they were trying to run a Java app from their personal web space on our web server. Specifically, he had a pair of Java apps for his cellular phone and wanted to be able to access them from the web rather than installing them directly on his phone. Because Java extensions other than .js were not configured in our Apache MIME types, he was having trouble getting the files to work properly

A quick search landed me on this page. A tremendous number of extensions and their associated MIME configuration are listed, including the several Java-related extensions. .jar, I discovered, needs the application/java-archive MIME type specified. He’s even got a Java applet built into the page for testing the file and the server, although it runs a bit wonky in Mozilla on my Linux laptop for some reason.

How is this handy to you, you ask? SysAdmins already know the answer to that question. For the rest of you, if you ever want to host a website from your home Linux box, be it to share an app with your own cell phone or to test some program development, this may save you some troubleshooting headaches.

Adding a MIME type is a simple matter of editing a text file, as is the case with most Linux systems. The file is typically named mime.types, and should reside in the same folder as your httpd.conf file. If you can’t locate it, open your httpd.conf file and search for the TypesConfig in your MIME module container. The argument should be the full path to the mime.types file. Make the change, restart the server, and you should be in good shape.

What Do You Think?

 
35 queries / 0.359 seconds.