I did not find how you can add a mime-type rule in the Google-App-Engine server (java). I tried to write in the web.xml file:

<mime-mapping> <extension>jnlp</extension> <mime-type>application/x-java-jnlp-file</mime-type> </mime-mapping> 

Did not help.

  • So did you see what the server actually returns? View HTTP headers - cy6erGn0m 6:55 pm
  • There is no application / x-java-jnlp-file anywhere in the headers. There's some tricky thing about static files and resource files on the official website written. Maybe try the <a type="application/x-java-jnlp-file" href="my.jnlp"> tag ... </a>. Although it is clear that you need to somehow set this Mime-type on the server. - angry

2 answers 2

It turns out that you can set the mime type rule in this way only for static files , and you need to create a jsp page for resource files.

    I do not have the opportunity to check, but there is still a way to set the MIME type through app.yaml

     - url: /path/to/file.jnlp static_files: path/to/file.jnlp mime_type: application/x-java-jnlp-file expiration: "30m" upload: path/to/file.jnlp 
    • This is for a server on python. And we have Java. There is no app.yaml. Only appengine-web.xml and web.xml - angry