IntelliJ Java IDE
The moose likes JNLP and Web Start and the fly likes setting up Web Sever MiMe Type Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Reply Bookmark "setting up Web Sever MiMe Type" Watch "setting up Web Sever MiMe Type" New topic
Author

setting up Web Sever MiMe Type

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
I'm having trouble setting up my web server to use jnlp.
I use apache and I added the following line to the mime.types file:
application/x-java-jnlp-file
Then I restarted the server but whenever I try to execute a jnlp file, my browser just displays the contents of the file and it doesn't do anything.

here are the contents of the file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://localhost/myapp/"
href="runmyapp.jnlp">
<information>
<title>Ronnie's Test Application</title>
<vendor>Mauro Inc.</vendor>
<homepage href="home.html"/>
<description>Load, edit and save any text file quickly and effectively!</description>
<description kind="short">My simple booking System</description>
<description kind="tooltip">A text Editor</description>
<icon href="img/logo.gif"/>
<offline-allowed/>
</information>
<resources>
<j2se version="1.3+"/>
<jar href="runme.jar"/>
</resources>
<application-desc main-class="suncertify.MainClass"/>
</jnlp>

Can anyone help?
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1863
hi Ronnie,
we have to set the browser mime type as well so that the brower can launch the jnlp file with jaws..
if u r on Windows/IE then it will accept ur system mime type settings. so basically u go to the Folder Options->View types and add just one more for the .jnlp extension..
if u use Netscape then u've to go "Preferences->Helper applications (or applications in NN4)"...
and set the jnlp mime type..
hth,
maulin


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
Actually I already had jnlp listed as a file type but it just started working and I didn't do anything to fix it. Oh well...Thanks dude. I appreciate your help.
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
The server must associate application/x-java-jnlp-file MIME type for JNLP files, so the line you need to add to the mime.types file is this:
application/x-java-jnlp-file JNLP
Notice the second part: "JNLP"
This way the server will return "application/x-java-jnlp-file" for every jnlp file.
HTH
 
 
subject: setting up Web Sever MiMe Type
 
Threads others viewed
security exception thrown will running application
nothing is displayed after the application is loaded
Do jnlp file updates itself
Web start problem
Problem launching app through web-server
IntelliJ Java IDE