title: The following required field is missing from the launch file: <jnlp>
body: <p>I have a web page containing an applet. This references a JNLP file.
  The web app is served by Tomcat.</p>
  
  <p>I've verified that the JNLP is valid using JaNeLA. To test this locally, I tried putting all the resource files in one directory and launching the web page - applet was displayed successfully in the browser.</p>
  
  <p>However when trying to serve up the web page via Tomcat I get this error</p>
  
  <pre><code>The following required field is missing from the launch file: &lt;jnlp&gt;
  </code></pre>
  
  <p>I suspect that the JNLP file is not being found, but after trying to place it within various locations under the Tomcat webapps directory, and various settings of the codebase parameter, still no joy.</p>
  
  <p>Here's my JNLP file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
     &lt;jnlp href="WWJApplet.jnlp"&gt;
      &lt;information&gt;
          &lt;title&gt;World Wind Java Applet Demo&lt;/title&gt;
          &lt;vendor&gt;NASA&lt;/vendor&gt;
          &lt;homepage href="http://worldwind.arc.nasa.gov"/&gt;
          &lt;description&gt;World Wind Java Applet Demo&lt;/description&gt;
          &lt;description kind="short"&gt;World Wind Java Applet Demo&lt;/description&gt;
          &lt;offline-allowed/&gt;
      &lt;/information&gt;
      &lt;security&gt;
          &lt;all-permissions/&gt;
      &lt;/security&gt;
       &lt;resources os="Windows"&gt;
         &lt;property name="sun.java2d.noddraw" value="true"/&gt;
       &lt;/resources&gt;
       &lt;resources&gt;
          &lt;!--property name="sun.java2d.noddraw" value="true"/--&gt;
          &lt;java version="1.5+"/&gt;
          &lt;j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+" initial-heap-size="512m" max-heap-size="512m"/&gt;
          &lt;jar href="mapviewapplet.jar" main="true"/&gt;
          &lt;!--jar href="WWJApplet.jar" main="true"/--&gt;
          &lt;jar href="worldwind.jar"/&gt;
          &lt;jar href="httpclient-4.0.1.jar"/&gt;
          &lt;jar href="httpcore-4.0.1.jar"/&gt;
          &lt;extension name="jogl"
                     href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"/&gt;
       &lt;/resources&gt;
       &lt;!-- Width and heigth are overwritten by the surrounding web page --&gt;
       &lt;applet-desc
           name="WWJ Applet"
           main-class="com.pwr.mapviewer.ui.MapApplet"
           width="800" height="600"&gt;
          &lt;param name="separate_jvm" value="true" /&gt;
       &lt;/applet-desc&gt;
     &lt;/jnlp&gt;
  </code></pre>
  
  <p>Here is my applet tag within the HTML</p>
  
  <pre><code>    &lt;applet 
            code="org.jdesktop.applet.util.JNLPAppletLauncher" 
            width=600
            height=400
            archive="mapviewapplet.jar,
                     jogl.jar,
                     gluegen-rt.jar,
                     worldwind.jar"&gt;
             &lt;param name="jnlp_href" value="WWJApplet.jnlp"/&gt; &lt;!-- Picked up by new plugin --&gt;
             &lt;param name="codebase_lookup" value="false"/&gt;
             &lt;param name="subapplet.classname" value="com.pwr.mapviewer.ui.MapApplet"/&gt;
             &lt;param name="subapplet.displayname" value="World Wind Applet"/&gt;
             &lt;param name="noddraw.check" value="true"/&gt;
             &lt;param name="progressbar" value="true"/&gt;
             &lt;param name="jnlpNumExtensions" value="1"/&gt;
  
       &lt;/applet&gt;
  </code></pre>
  
  <p>Edit: I placed the JNLP, along with all my other resources in the Apache web server root directory, and used a URL in my jnlp_href attribute -</p>
  
  <pre><code>&lt;param name="jnlp_href" value="http://localhost:80/WWJApplet.jnlp"/&gt;
  </code></pre>
  
  <p>I'm still not sure how this should be deployed within Tomcat, but for now the above resolves my problem</p>