tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Sabourdin <sabour...@yahoo.com>
Subject Probleme with ClassPath or something.
Date Mon, 10 Jul 2000 13:53:58 GMT
  Hello,
 I try to access a Mysql Database from my jsp
files And I receive:
"java.sql.SQLException: No suitable driver"
I know that means that my JVM (1.3) can not
access the drivers, but I have 
this message on start up
"Context log: path="/test" Adding context
path="/test"  docBase="webapps/test"
Starting tomcat. Check logs/tomcat.log for error
messages
Starting tomcat install="D:\Java\tomcat"
home="D:\Java\tomcat" classPath="D:\Jav
a\tomcat\classes;D:\Java\tomcat\lib\webserver.jar;D:\Java\tomcat\lib\jasper.jar;
D:\Java\tomcat\lib\xml.jar;D:\Java\tomcat\lib\servlet.jar;D:\Java\jdk1.3\lib\too
ls.jar;D:\Java\jdk1.3\lib\mysql.zip;D:\Java\jdk1.3\lib;"

so that suppose that my jar file (mysql.zip) is
in my CLASSPATH, so I try to set it into
"tomcat\lib", with no success has I try tu unzipp
it with no more succes.

Did I forgot something?

String defDBUrl =
"jdbc:mysql://192.168.111.200/test?user=XXX&password=xxxx";
	String DBUrl = request.getParameter("dburl");
	if (DBUrl == null)
		DBUrl = defDBUrl;
	request.setAttribute("dburl",DBUrl);	
	String fwd = "index.jsp";
	String action = request.getParameter("action");
	//init = null;
	if (init == null)
{
		try
		{
		    
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
		}
		catch (Throwable e)
		{
			e.printStackTrace();
		}
		application.setAttribute("init",new
Boolean(true));
}

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message