Hello,
I am developing a web application in JRun. I have a table in my db schema
which contains the following columns:
paramName primary key
paramValue
paramRequired
paramDefault
These columns represent various web page parameters and are used to
customize the jsp pages to the client's liking. My web app will have many
(50 or 60) of these records. My question is what is the best way to "read
in" the contents of this table at server startup ?
I thought I would create a Servlet that is preloaded on server startup. This
servlet would query the database and put the data into
ServletContext/application object, this way the parameters can be shared by
all JSP/servlets in the web app. Is there a better way to do this?
Also, I believe that a resultset is not serializable so I would probably
have to use a Vector or hashtable before adding to the ServletContext. Any
suggestions would be appreciated!
Thanks,
Vic
P.S. I don't think I should specify these parameters as "application
variables" in the JMC because
1) There are way too many
2) Each "paramName" has 3 corresponding attributes (paramValue,
paramRequired and paramDefault).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists