|
 |
pro_jsp thread: how the jsp link to mysql???
Message #1 by "at1323" <at1323@s...> on Fri, 14 Dec 2001 11:23:49
|
|
Thanks, you have provided info. regards to Windows NT server.How can that be
defined if it is Linux and Apache server?
>From: "James McIntosh" <james@m...>
>Reply-To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>Subject: [pro_jsp] Re: how the jsp link to mysql???
>Date: Mon, 17 Dec 2001 11:03:04 +1300
>
>put an extra / after the mysql://
>mysql://ipaddress:port/dbname?user=&pass
>
>if you go /// then it assumes localhost port 3306
>
>James McIntosh
>james@m...
>
>
>----- Original Message -----
>From: "at1323" <at1323@s...>
>To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>Sent: Friday, December 14, 2001 11:23 AM
>Subject: [pro_jsp] how the jsp link to mysql???
>
>
> > hi, everybody^^
> > when i used the mm.mysql.jdbc-1.2c.tar.gz(download from MYSQL web
> > site), i program the jSP code like list;to tried to test the MYSQL:
> >
> > test1.jsp:
> > <%@ page import="java.sql.*,java.io.*" %>
> > <%
> >
> > Class.forName("org.gjt.mm.mysql.Driver");
> > Connection myConn =
>DriverManager.getConnection("jdbc:mysql://physicain");
> > Statement stmt =myConn.createStatement();
> > ResultSet myResultSet =stmt.executeQuery("select * from doctor");
> > if(myResultSet != null){
> > while (myResultSet.next()){
> > String name = myResultset.getString("name");
> > String id = myResultset.getString("id");
> > out.println(name);
> > out.print(id);}}
> > stmt.close();
> > myConn.close();
> >
> > %>
> >
> > my classpath set=c:\jdk1.3.1\bin;c:\usr\jsp;c:\usr\jsp\jdbc;
> > PS:test1.jsp is in c:\usr\jsp
> >
> > the jdbc driver is mm.mysql.jdbc-1.2c.tar.gz ,my computer oS is
> > windows2000 adv server,i used winace to uncomprese it and fix the name
>for
> > jdbc and put it in c:\usr\jsp\,
> >
> > i think that is true, it's no any wrong, why it can't work~_~·F
> >
> > the wrong message is:
> >
> > Error: 500
> > Internal Servlet Error:
> > javax.servlet.ServletException: Unable to load class
>rg.gjt.mm.mysql.Driver
> >
> > please help me,tks^^
> >
> > ---
> > Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
> > offers industry's ONLY complete 100% JMS messaging solutions for your
> > needs TODAY.
> > Visit
>http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%2Dsoftwired&url=www.so
>ftwired-inc.com NOW and find
> > out more!
> > Our unique product range includes: iBus//Mobile (wireless data),
> > iBus//MessageBus (IP Multicast), iBus//MessageServer (store and forward)
> > and much more!
> >
> >
>
>
>
>
>---
>Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
>offers industry's ONLY complete 100% JMS messaging solutions for your
>needs TODAY.
>Visit
>http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%2Dsoftwired&url=www.softwired-inc.com
>NOW and find
>out more!
>Our unique product range includes: iBus//Mobile (wireless data),
>iBus//MessageBus (IP Multicast), iBus//MessageServer (store and forward)
>and much more!
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
|
|
 |