I ran through the example in K&B on using ServletContextListener, that works fine.
But then I tried to use a HttpSessionListener to respond to a user's invoking a
servlet by putting an attribute into the session. This listener never gets called.
My listener:
The DD:
The servlet, which I expected would trigger the session listener:
I expected that line 03 above would trigger the session listener to create the attribute. But the output is "Your dog is null". So I am not quite understanding how sessions work.
Am I going about this wrong? Or is this something I should not try at all?