Load database look up tables during servlet start up
Posted on 2004-09-25
I am new to JSP and Struts. I am building a web application where I have Simple "Search" button which always exists. The user will be able to search for an "application" either by its name or type ect. The "type" should be a combo box. The values in the combo box should be read from the oracle database. When and Where should I load the database lookup tables. There are atleast 5 look up tables that needs to be read at start up.
I was planning on extending "org.apache.struts.action.ActionServlet" class and override init() method to connect to the database and load these tables and put then in application scope for use in both jsps or actions. I am using Weblogic 8.1 app server and using its JDBC datasources and connection pool.
Please advice on how to go about this problem.