When you need to host a specific file on your spring application...

... and you don't want to disturb server configuration, as it would mean you need to make this setting on every new server you deploy your application.

Simply add to web.xml something like this:
<mime-mapping><extension>jnlp</extension>
  <mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping><extension>jar</extension>
  <mime-type>application/java-archive</mime-type>
</mime-mapping>


Hope this helps anyone else. I was always rechecking Spring Security filters and always forgetting about the supporter MIME types...

Comments

Popular posts from this blog

Timeline on Latex

Exporting Skype Chat/Skype Contacts to csv file using the shell script and sqlite3 (usually already installed on mac)

trim() not supported by IE7 and IE8