title: Host apple-app-association-file in tomcat web server
body: <p>We have a requirement of enabling universal link in our application. We have a java based web application(spring) and a iOS app. To enable universal link as per apple we need to create a json file apple-app-association-file and host this file in the server.
  Now  java web app is deployed in tomcat in windows server and apche 2.4 is being used as web server. Please let me know how to host the apple-app-association-file in the tomcat or web server or inside the war file(inside the code), we are using maven structure.
  according to docs, we need to remove the file extentsion and file should be access as below:</p>
  
  <p>url of web app: <a href="https://xyz.example.com" rel="nofollow noreferrer">https://xyz.example.com</a></p>
  
  <p>where xyz.example.com is mapped to a web app which is there in webapp folder in tomcat.(localhost:8080/webApp)</p>
  
  <p>apple-app-association-file to be accessed as: <a href="https://xyz.example.com/apple-app-association-file" rel="nofollow noreferrer">https://xyz.example.com/apple-app-association-file</a></p>
  
  <p>now as the extension is not there how can i host it.Do i need to make the code changes and treated it as servle request. Even if i do so it wont be a good idea to execute a servet just to access a file</p>
  
  <p>Also, it's also important that the file is served with the correct MIME-type, for Universal Links it can be served as application/json. How to set mime type in tomcat or java web app(spring)</p>