Hello frnds, Anybody please help me. Am using Hypersonic sql database(that is HSQLDB) and struts 1.3.8 version am using.Anybody tell me to configure database in struts. Reply me soon
Joined: Feb 15, 2005
There is nothing unique about using a database in a Struts application. The best practice is to configure a JNDI Data Source in your Application Server that points to your database and then use a JNDI lookup in your application code to find the Data Source and use it to establish a connection to the database. You would then use standard JDBC code to access the tables.
Earlier versions of Struts allowed you to configure an Apache Commons Data Source within the Struts config file. The authors of Struts, however, realized this was not a good idea, and they removed it from the latest versions of Struts. [ March 05, 2008: Message edited by: Merrill Higginson ]