Thursday, March 6, 2003 02:25 AM
Well, the two approaches aren't really that different. The latter only uses an extra layer of abstraction and is actually precompiled into servlet code before actual bytecode compilation.
Anyway, the servlet approach is more appropriate because you can more accurately control what you're doing. This could be implemented as a JSP, but the JSP compiler can include some totally unnecessary stuff into the servlet code and it's definitely more difficult to structure your code within a JSP (referring to JSP method declarations versus regular method declarations).