Java and JSP to MySQL database  
Author Message
tsang_ivan





PostPosted: 2003-11-8 11:28:00 Top

java-programmer, Java and JSP to MySQL database Dear all,

I am planning to build my web application with the following
architecture:

Redhat Linux 9.0 platform
Apache Tomcat Web Server
MySQL database
JSP with Java for writing the web page

But unfortunately, I encountered some problems in properly linking my
JSP to the mysql database. I have installed the JDBC connector
interface already.
I would apperciate if anyone can give me some hints on the proper set
up and configuring of the architecture.

Thanks a lot.

Ivan
 
Petarian





PostPosted: 2003-11-9 1:46:00 Top

java-programmer >> Java and JSP to MySQL database

--------------060406080708000601040002--

What error(s) are you getting. The most common reason for this to not
work is:

1) MySQL Jar files are not in your class path. Put mysql.jar in

$TOMCAT/webapps/$YOUR_APP/WEB-INF/lib

2) You have specified an incorrect connection string. Your class name
for JDBC driver should be:

com.mysql.jdbc.Driver

and the connection URL should be:

jdbc:mysql://<HOSTNAME>:<PORT>/<DBNAME>


We are using exact same configuration on our site and everything is
working fine.

Regards,
Pete


--

You don't pay to get spam, why pay to clean it?
Visit http://www.spammarshall.com to create an account for free
<http://www.spammarshall.com>

Ivan wrote:

>Dear all,
>
>I am planning to build my web application with the following
>architecture:
>
>Redhat Linux 9.0 platform
>Apache Tomcat Web Server
>MySQL database
>JSP with Java for writing the web page
>
>But unfortunately, I encountered some problems in properly linking my
>JSP to the mysql database. I have installed the JDBC connector
>interface already.
>I would apperciate if anyone can give me some hints on the proper set
>up and configuring of the architecture.
>
>Thanks a lot.
>
>Ivan
>
>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
What error(s) are you getting. The most common reason for this to not work
is:<br>
<br>
1) MySQL Jar files are not in your class path. Put mysql.jar in <br>
<br>
$TOMCAT/webapps/$YOUR_APP/WEB-INF/lib<br>
<br>
2) You have specified an incorrect connection string. Your class name for
JDBC driver should be:<br>
<br>
com.mysql.jdbc.Driver <br>
<br>
and the connection URL should be:<br>
<br>
jdbc:mysql://<HOSTNAME>:<PORT>/<DBNAME><br>
<br>
<br>
We are using exact same configuration on our site and everything is working
fine. <br>
<br>
Regards,<br>
Pete<br>
<br>
<br>
<div class="moz-signature">-- <br>

<style type="text/css">
P {
font-family: Tahoma, Arial, Verdana;
font-size: 12px;
color: black;
}
H1 {}
H2 {}
H3 {}
HR{
line-height : 1;
text-align : left;
height : 1;
width : 80%;
color : #CC0000;
}
A {}
A:Visited {}
A:Active {}
A:Hover {}
BODY {
font-family: Tahoma, Arial, Verdana;
font-size: 12px;
color: black;
}
table {
font-family: Tahoma, Arial, Verdana;
font-size: 11px;
color: black;
}


</style>
<p> You don't pay to get spam, why pay to clean it?<br>
Visit <a href="http://www.spammarshall.com">http://www.spammarshall.com</a>
to create an account for free<br>
<a href="http://www.spammarshall.com" target="_blank"> <img
src="http://www.spammarshall.com/SpamMarshall/images/logo-g.gif"
border="0">
</a> </p>
</div>
Ivan wrote:<br>

<blockquote type="cite"
cite="email***@***.com">
<pre wrap="">Dear all,

I am planning to build my web application with the following
architecture:

Redhat Linux 9.0 platform
Apache Tomcat Web Server
MySQL database
JSP with Java for writing the web page

But unfortunately, I encountered some problems in properly linking my
JSP to the mysql database. I have installed the JDBC connector
interface already.
I would apperciate if anyone can give me some hints on the proper set
up and configuring of the architecture.

Thanks a lot.

Ivan
</pre>
</blockquote>
<br>
</body>
</html>