Originally posted by Gabriel Claramunt:
Can you use JSF? If you insist, IS part of J2EE and you only need POJOs, very easy to test. If you experienced the pain of working with plain JSPs and servlets, JSF is a blessing
Originally posted by Peer Reynders:
JavaWorld: Testing J2EE applications (2004-Aug)
J.B. Rainsberger (Diaspar): Test-Driven J2EE
[ September 10, 2007: Message edited by: Peer Reynders ]
Originally posted by Stan James:
Spring's inventor wrote about the power of POJOs - Plain Old Java Objects - before he did Spring. Spring dependency injection is just one way to isolate your POJOs from J2EE. You can do it on your own.
One idea is to reduce the classes that know about HTTP, Session, Request, Response, EJB, etc. to minimal gateways. They do as little as possible before handing off responsibility to classes with no J2EE imports. For example, a servlet might copy all the request parameters into a HashMap and call a POJO. (You asked about doing this "without a framework" but you're really building a smallish framework at this point.)
Now you don't have a J2EE question any more. You can TDD all your POJOs without thinking about servlet or EJB containers.
Is that the kind of thing you're looking for?