JSP 2 <sql tag>
I need help linking to my mySQL DB through the web.xml file.
Currently I am using this code in each JSP:
<sql:setDataSource var="myconn"
url="jdbc:mysql://localhost/drinksDB"
user="USERNAME"
password="PASSWORD"
driver="com.mysql.jdbc.Driver" />
How can I add the reference into my web.xml file?
I thought that it went like this, but it doesn't work:
<context-param>
<param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
<param-value>localhost:3306:drinksDB,com.mysql.jdbc.Driver,USERNAME,PASSWORD</param-value>
</context-param>
I also tried this:
<context-param>
<param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
<param-value>jdbc:mysql://localhost/drinksDB,com.mysql.jdbc.Driver,USERNAME,PASSWORD</param-value>
</context-param>
Thanks,
Matt
Message was edited by:
MatthewWeiler

