Hi all,
I'm having an issue while implementing an App Listener for my App.
Thing is that the ApplicationListener appears to be working fine, as from the
logs I can see that the contextInitialized method is being invoked.
Inside the method I do this call, same way as the Mailreader sample app does:
context.setAttribute(DATABASE_KEY, database);
The problem comes when from my action:
public class MyAction extends ActionSupport implements ApplicationAware {
public DBConnector getDatabase() {
Map application = getApplication();
Object db = application.get(DATABASE_KEY);
...
}
db is returning null, like if the object got lost somewhere...
here's the fragmen of my web.xml:
<listener>
<listener-class>
myApp.ApplicationListener
</listener-class>
</listener>
Any ideas?
Thank you!
Martin