Reputation: 1815
I have a java application uploaded on a web portal linked to a .jnlp
file. The link of the file is in a html file Launch.html
shown as below:
The error I am getting when I click on launch button is as follows:
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
launch.jnlp contents:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="" href="launch.jnlp" spec="1.0+">
<information>
<title>BuisnessInternals</title>
<vendor>Administrator</vendor>
<homepage href=""/>
<description>BuisnessInternals</description>
<description kind="short">BuisnessInternals</description>
<icon href="Welcome2.png" kind="splash"/>
</information>
<update check="always"/>
<resources>
<j2se version="1.6+"/>
<jar href="BuisnessInternals.jar" main="true"/>
<jar href="lib/AbsoluteLayout.jar"/>
<jar href="lib/itext-pdfa-5.3.3-javadoc.jar"/>
<jar href="lib/itext-pdfa-5.3.3-sources.jar"/>
<jar href="lib/itextpdf-5.3.3.jar"/>
<jar href="lib/itext-xtra-5.3.3-javadoc.jar"/>
<jar href="lib/itext-xtra-5.3.3-sources.jar"/>
<jar href="lib/itext-xtra-5.3.3.jar"/>
<jar href="lib/itextpdf-5.3.3-javadoc.jar"/>
<jar href="lib/itextpdf-5.3.3-sources.jar"/>
<jar href="lib/itextpdf-5.3.3.jar"/>
<jar href="lib/beansbinding-1.2.1.jar"/>
<jar href="lib/eclipselink-2.3.2.jar"/>
<jar href="lib/javax.persistence-2.0.3.jar"/>
<jar href="lib/org.eclipse.persistence.jpa.jpql_1.0.1.jar"/>
<jar href="lib/barcode.jar"/>
<jar href="lib/itext-pdfa-5.3.3-javadoc.jar"/>
<jar href="lib/itext-pdfa-5.3.3-sources.jar"/>
<jar href="lib/itext-pdfa-5.3.3.jar"/>
<jar href="lib/itext-xtra-5.3.3-javadoc.jar"/>
<jar href="lib/itext-xtra-5.3.3-sources.jar"/>
<jar href="lib/itext-xtra-5.3.3.jar"/>
<jar href="lib/itextpdf-5.3.3-javadoc.jar"/>
<jar href="lib/itextpdf-5.3.3-sources.jar"/>
<jar href="lib/itextpdf-5.3.3.jar"/>
<jar href="lib/jcalendar-1.4.jar"/>
</resources>
<application-desc main-class="buisnessinternals.mainFrame">
</application-desc>
</jnlp>
launch.html contents:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test page for launching the application via JNLP</title>
</head>
<body>
<h3>Test page for launching the application via JNLP</h3>
<script src="http://java.com/js/deployJava.js"></script>
<script>
deployJava.createWebStartLaunchButton("launch.jnlp")
</script>
<!-- Or use the following link element to launch with the application -->
<!--
<a href="launch.jnlp">Launch the application</a>
-->
</body>
</html>
Any ideas how can solve it?
Upvotes: 0
Views: 2477
Reputation: 11298
Specify MIME type in your JnlpDownloadServlet
response.setContentType("application/x-java-jnlp-file");
Read this Java Web Start tutorial for clear understanding.
Edit
<a href="launch.jnlp">Launch the application</a>
The above html link you specified should work properly, make sure your launch.jnlp
file path where you kept something like <a href="/somepath/launch.jnlp">
Upvotes: 1
Reputation: 43728
Seems like the web server needs some extra configuration to correlate the .jnlp file extension with the application/x-java-jnlp-file mime type.
Upvotes: 1