Hello All,
Currently I'm using
JSP scriptlets to establish connectivity with a database (with all variables declared within a JSP page). This database will be accessed from a number of pages. I'm thinking about using a bean (with application scope) to establish a connection and store all necessary variables. This way, I can use the bean (and the database connection) by simply accessing the Connection variable. First, is there a fault in my logic here (I'm new to JSP)? Second, which would be a better implementation (in regards to security/efficiency):
1.) a bean as described above
2.) a JSP page with all necessary variables and database functions (sort of like a header file)
You guys are great. Thanks for any help/suggestions you can offer.
WS