Q:

Tomcat8 is only serving JSP files, want to configure to have it serve txt files

I am using AWS elasticbeanstalk tomcat8 that is configured in a way to serve only JSP files but I would also like it to serve files that are txt or any other extension. 
Any advice in this regard will be appreciated.

A:

The solution to the problem is putting in the following servlet-mapping in web.xml:
<servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.txt</url-pattern>
</servlet-mapping>

The default servlet was defined but this mapping was missing and by putting it in I was able to access any .txt file.

