Database connection settings in jsp

You can use the following code for Database connection in jsp page.

<!– Database connection settings –>
<property name=”connection.driver_class”>com.mysql.jdbc.Driver</property>
<property name=”connection.url”>jdbc:mysql://localhost/database_name</property>
<property name=”connection.username”>databses_user</property>
<property name=”connection.password”>password</property>
<!– configuration pool via c3p0–>

Note : Replace database_name = exact database name,
databses_user = exact database username
password = exact database password

Related posts

Leave a Comment