Configuration |
eStruts can connect to any database and the configuration can be done in Datasources.xml |
3.1. Adding a new Database to the configuration list |
Edit Datasources.xml file and add a new Database details by adding |
<Params> <DbName id="@ID" > </DbName> <DriverName> </DriverName> <URL> </URL> <UserName></UserName> <Password></Password> </Params> |
Example: Adding a new Driver for an Oracle Database |
<Params> <DbName id="@ID" > OracleDatabase </DbName> <DriverName>oracle.jdbc.driver.OracleDriver1 </DriverName> <URL> jdbc:oracle:thin:@localhost:1521:SID </URL> <UserName>scott</UserName> <Password>tiger</Password> </Params> |
DbName id = next id number in the list> |
DriverName = Name of the driver (may be a native driver or from third party) |
URL = Connection to the Database |
Username = username for the database |
Password = password for the database (Optional) |