Tomcat doesn't want to download anything

This isn't strictly jme related, but I am trying to deliver my jme application using WebStart. So I installed tomcat, created a war archive, put all the stuff into it, created a web.xml, signed all my jars and deployed all that to the running tomcat server using the tomcat manger. So, the server side of the application is working - I can access the URL which it is supposed to listen to and I get the desired data.



But when I try to access the jnlp file I get a 404. When I try to run the jnlp file directly it runs, but then fails with an exception which says that it couldn't access the application jar that it should download from the tomcat webapp. Apparently I need to say something in the web.xml with regards to that, but all my reading of tutorials out there doesn't turn up anything conclusive.



The war file looks such that it contains the following files:

launcher.jnlp

Web-inf/web.xml

Web-inf/lib/.jar



The web.xml looks like this:



<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

  <display-name>WordGraph</display-name>

  <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.htm</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    <welcome-file>default.html</welcome-file>

    <welcome-file>default.htm</welcome-file>

    <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <servlet>

    <servlet-name>JnlpDownloadServlet</servlet-name>

    <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>

  </servlet>

  <servlet-mapping>

      <servlet-name>JnlpDownloadServlet</servlet-name>

      <url-pattern>/
</url-pattern>

  </servlet-mapping>

  <servlet>

      <servlet-name>MyApp</servlet-name>

      <servlet-class>

com.sun.jersey.spi.container.servlet.ServletContainer

      </servlet-class>

      <init-param>

    <param-name>com.sun.jersey.config.property.packages</param-name>

<param-value>MyApp</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

  </servlet>

  <servlet-mapping>

  <servlet-name>MyApp</servlet-name>

  <url-pattern>/*</url-pattern>

  </servlet-mapping>

</web-app>



the jnlp file looks like this:



<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0+"

      codebase="http://localhost:8080/MyApp/"

      href="launch.jnlp">



  <information>

    <title>MyApp</title>

    <vendor>Me</vendor>

    <homepage href="http://localhost"/>

    <description>somedesc.</description>

    <description kind="short">someshortdesc</description>

    <offline-allowed/>

  </information>

  <security>

      <all-permissions/>

  </security>

  <resources>

    <jar href="MyApp.jar"/>

    … all my other jars in a similar way

    <!-- extension name="other_vendor" href="other_vendor.jnlp"/ -->

  </resources>



  <resources os="Windows">

  <j2se version="1.5+"/>

    <nativelib href="windows-native.jar"/>

  </resources>

  <resources os="Mac OS">

    <j2se version="1.5+"/>

    <nativelib href="macos-native.jar"/>

  </resources>

  <resources os="Linux" arch="i386">

    <j2se version="1.5+"/>

    <nativelib href="linux-native.jar"/>

  </resources>

  <application-desc main-class="MyApp"/>

  <component-desc/>

</jnlp>



However, if I split things up, and make one server tomcat application (with the part that works as described above), and one client tomcat app, which is simply a war file containing the jnlp file and the jars directly (without any subdirectories), then at least running the jnlp file locally (that is, just doublicking it there in my folder, instead of accessing its URL on the tomcat server) works and I can enjoy both the client side of my app, as well as it successfully talking to the server side.



But I don't think this is the way it's supposed to work. Apparently, if I don't have a web.xml, it defaults to something that happens to work for me, whereas my proper web.xml does something wrong, or omits to do something. Anyone any ideas?