Is dependency injection possible for JSP beans?
- by kazanaki
This may be a long shot question..
I am working on an application that is based on JSP/Javascript only (without a Web framework!)
Is there a way to have depencency injection for JSP beans?
By jsp beans I mean beans defined like this
<jsp:useBean id="cart" scope="session" class="session.Carts" />
Is there a way/library/hack to intercept the bean creation so that when "cart" is referenced for the first time, some some of injection takes place?
Can I define somewhere a "listener" for JSP beans (like you can do for JSF beans for example)?
I am free to do anything I want in the back-end, but I cannot add a web framework in the front-end (Don't ask!)