Hi ranchers.
It just me thinking loud
. Understand this more as a request to the experts to comment on this:
In a fully fledged
J2EE application the initialization of a database connection belongs in some sort of a data access layer and not in the presentation layer.
J2EE-architecture should support the easy substituition of a web-client frontend with other frontends such like a Swing-App or a Wap-Interface. So the backend data access logic should be very loosely coupled with the frontend.
In a pure webApp (where the probability of the need to support other client types in the future change path is very low) you might put it into a bean queried from the jspInit() or in the Controller servlet of a ModelViewController architecture.
It seems to be not very intelligent to put it in a taglib, because you cannot call the taglib code from jspInit(). So you can`t use the session life-cycle stuff and the connection is initialized everytime the JSP is invoked.
Axel
[ January 09, 2002: Message edited by: Axel Janssen ]