Hi, I work on the OpenEJB project. I wanted to add support for injecting resources into struts actions i.e. if somebody creates a struts based web app and deploys it in Tomcat + OpenEJB, then I want the user to be able to annotate the struts actions with @EJB, @Resource etc and then have OpenEJB inject those resources. To do that, I need to find out which classes in the web-app represent actions. Initially I thought that struts.xml would contain all the Action classes (listed as part of action elements). Then I found out that one could also include other xml files within struts xml using the <include/> element. Since I do not know struts 2 that well, I have a few questions which will help me a long way to add injection support:- 1. Does the struts config files has to be named struts.xml or can it be named something else? If yes, how would struts discover such a file? 2. Are all actions mapped in struts.xml and the included xml files (using the include element) or there could be actions which do not need to be listed in these xml files. 3. I was planning to write a plugin, but wanted to have access to the ServletContext within the plugin. Could you show me how to do that -- I tried implementing ServletContextAware in the plugin class, but that did not work for me (maybe that interface is only supposed to be implemented by actions)
Thanks -- Karan Singh Malhi