I'm building my webapplication with struts, using the BaseBean.java concept of JPetStore. In a class that extends the BaseBean class, I can access application, request, session etc. variables by doing:

Map applicationMap = ActionContext.getActionContext().getApplicationMap();
Timer tasks = (Timer) applicationMap.get("tasks");

Under the surface, the ApplicationMap makes getAttributes calls to the ServletContext. But now I want to use the getResourceAsInputStream method of ServletContext. Should I add a method to ApplicationMap? If I do this, it isn't really a 'Map' anymore, is it?


Reply via email to