I haven't had much luck finding out why this is returning null for ServletContext objects.
I've tried using relative and absolute file locations, both are returning null. I've tried moving the template to a deeper path, as i've read elsewhere on SO but it still returns a null. Perhaps I'm not quite understanding why it's returning null, is it not finding the file? It's not throwing an exception, so I'm having troubles understanding what is going on here.
ServletContext context = getServletContext();
InputStream is = context.getResourceAsStream("/WEB-INF/" + templateLocation);