From owner-freebsd-questions Wed Oct 23 10:44: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 282AC37B4AE for ; Wed, 23 Oct 2002 10:44:06 -0700 (PDT) Received: from hotmail.com (oe20.pav2.hotmail.com [64.4.36.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id D629643E42 for ; Wed, 23 Oct 2002 10:44:05 -0700 (PDT) (envelope-from unixtools@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 23 Oct 2002 10:44:05 -0700 X-Originating-IP: [202.41.224.36] From: "Unix Tools" To: "Liu Siwei" , References: Subject: Re: help me about jsp connect to mysql Date: Wed, 23 Oct 2002 11:10:39 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: X-OriginalArrivalTime: 23 Oct 2002 17:44:05.0709 (UTC) FILETIME=[C842CFD0:01C27ABB] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, <%@ page language="java" import="java.io.*, java.util.*, java.sql.*" session="true" %> <% Class.forName("org.gjt.mm.mysql.Driver"); Connection dbConn=DriverManager.getConnection("jdbc:mysql:///?user=&password="); Statement stmt=dbConn.createStatement(); ResultSet rs=stmt.executeQuery("show tables"); while(rs.next()) { out.println(rs.getString(1)); } %> This will work Thank You. ----- Original Message ----- From: "Liu Siwei" To: Sent: Tuesday, October 22, 2002 01:33 PM Subject: help me about jsp connect to mysql > Hi,all: > Please help me. > > I have installed jdk1.3.1(freebsd native) and Tomcat 4.1.x and mysql323 > from port and put MySQL jdbc driver to /usr/local/jdk1.3.1/jre/lib/ext and > WEB-INF/lib, but when I use root to connect MySQL from jsp, it says: > > Server configuration denies access to data source > > why? when i work in MS windows, i have no problem. > > how to solve it ? > > Best Regard. > > _________________________________________________________________ > 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/lccn/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message