-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Anup,
On 2/21/2011 10:20 AM, Anup Niroula wrote:
> Hi,
> out.println ("Cannot connect to database server message "+e.getMessage());
> "This gives following error msg:
> "Cannot connect to database server com.mysql.jdbc.Driver."
How about e.printStack
Hi,
out.println ("Cannot connect to database server message "+e.getMessage());
"This gives following error msg:
"Cannot connect to database server com.mysql.jdbc.Driver."
I am using windows 7.
On Mon, Feb 21, 2011 at 8:44 AM, Martin Gainty wrote:
>
> 1)putting a lightly loaded "engine light on"
1)putting a lightly loaded "engine light on" text message is neither helpful
nor delivers any useful information to those of us trying to determine your
error
always include the message from the exception object e.g.
out.println ("Cannot connect to database server message="+e.getMessage());
2)
> From: Anup Niroula [mailto:anup.niro...@gmail.com]
> Subject: connecting jsp with mysql
> I downloaded jdbc driver "mysql-connector-java-5.1.15-bin.jar"
> and placed it in two locations:
>- CATALINE_HOME\lib
>- C:\Program Files\Apache Software Foundation\Tomcat
>7.0\webapps\lsc\WEB
On Mon, 21 Feb 2011 07:55:05 -0600, Anup Niroula
wrote:
catch (Exception e)
{
out.println ("Cannot connect to database server");
}
I guess the answer is hidden within 'e'.
Anyway, you should rather use JNDI
http://tomcat.apache.org/tomcat-7.0