Hello All, thanks for taking a look at my question.
I have a working jsp/servlet app running on apache and
tomcat 7. but I am not sure about the program flow.
I have the following setup (actual questions at bottom of post).
context.xml -
web.xml - listener setup, but no resource-ref
connServletListener.java
DbConnectionClass.java
testjdbc.jsp
I apologize for the long preliminary. As I understand it this is how the app should work
at startup context.xml and web.xml are read, then the listener is called which in turn calls the dbconnectionclass that creates a datasource object and some testjdbc.jsp uses this datasource.
This app actually works, and the servletListener examples I have seen say that a resource should be in web.xml. Why does this app work with out it?
What is it that is calling the Connection getConnection() method of DbConnectionClass?
In jdbcTest.jsp is <sql:query..... dataSource="jdbc/printShop"> somehow going around or ignoring the datasource object created by DbConnectionClass?