Well in more detail of why I want the ServletContext is because I want to render some FreeMarker templates within the struts 2 action class (not as the result type). FreeMarker allows me to set the template loading with the three methods:
1. setDirectoryForTemplateLoading(File dir);
2. setClassForTemplateLoading(Class cl, String prefix);
3. setServletContextForTemplateLoading(Object servletContext, String path);
please see
http://freemarker.sourceforge.net/docs/pgui_config_templateloading.html for my reasons to wanting to use method 3. But in short, method 1 is out of the question as its a fixed location and since i cant get a hold of ServletContext I'm forced to use method 2 which requires me to put the FreeMarker templates in the classpath specified. Its not a major obstacle but I would like to put the templates in a seperate directory and not in the classpath.
with regards to getting filterConfig, I have little idea on how to do that, and any help on that would be greatly appreciated also
cheers,
sam