Forgot to mention: b1) and b2) require changing the web.xml
b1) to change the servlet class, b2) to add the listener.