httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manupriya <>
Subject [users@httpd] Problem with accessing jar file on Apache server (jnlp)
Date Wed, 18 Feb 2009 09:40:17 GMT


I have a jar that contains some js files that I want to refer. I am using
Apache HTTP Server 2.0.x

I understand, I will have to configure a jnlp file for using the jar file on
the Apache Server. I carried out the following steps:

1. I have a test.jar that contains a test.js which has a simple java script
2. Created a folder as jnlp under htdocs
3. Put the test.jar in htdocs/jnlp folder
4. edit conf/mime.types file added the following entry - 
application/x-java-jnlp-file			jnlp
5. Created test.jnlp and added the following content - 
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for jar Demo Application -->
	<title>Test Application</title>
	<vendor>Basis International Ltd.</vendor>
	<description>Test Application</description>
	<description kind="short">A test to basis.</description>

     <jar href="/jnlp/test.jar"/>

6. I have put the test.jnlp file in htdocs/jnlp folder
7. Then I created test.jar.var file with following content -
URI: jnlp/test.jar
Content-Type: x-java-archive

8. I have put test.jar.var file in the htdocs folder
9. Then I created a .htaccess file with following content and put in the
htdocs folder - 
# Return the right mime type for JARs
AddType application/x-java-archive .jar
# Enable type maps
AddHandler application/x-type-map .var
Options +MultiViews
# Tweak MultiViews - this line is for
MultiViewsMatch Any
My directory structure is as follows - 

10. After doing all this I restarted the Apache server and tried hitting the
following using Firefox 3.0.1 - 

But I get Page Load error -
Unsafe File Type
The page you are trying to view cannot be shown because it is contained in a
file type that may not be safe to open. Please contact the website owners to
inform them of this problem.

I think I am doing something wrong with the configuration. Please let me
know if there is any resource that I can refer for this.

NOTE- I am able to access this jar on Tomcat Server.


View this message in context:
Sent from the Apache HTTP Server - Users mailing list archive at

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message