Hi,
I am fairly new to using Tomcat. I am attempting to use a centralized
location to define the MySQL access configuration info. It is my
understanding that the /WEB-INF/web.xml is the best location to store
this info.
I have defined a set of JDBC parameters such as the driver info shown
below in my web.xml file for the web app:
<context-param>
<param-name>jdbc.driver</param-name>
<param-value>com.mysql.jdbc.Driver</param-value>
</context-param>
...
Within a JSP file, I attempt to get the parameter via the implicit
application variable:
<sql:setDataSource
driver="<%= application.getInitParameter("jdbc.driver") %>"
url="<%= application.getInitParameter("jdbc.url") %>"
user="<%= application.getInitParameter("jdbc.username")" %>"
password="<%= application.getInitParameter("jdbc.password")" %>"
var="db" />
Unfortunately, I receive the following error:
org.apache.jasper.compiler.ParseException:
/search-all-cables.jsp(10,56) Attribute jdbc.driver has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
...
FYI, I am using Tomcat 4.0.4 with J2SDK 1.4.0_01.
Thank you,
Michael
--
Michael R. Schwab
Design Engineer
QCC Communications Corp.
[EMAIL PROTECTED]
Voice: (306) 249-0220
Fax: (306) 249-5128
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>