What's this?CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/mm.mysql-2.0.14-bin.jarBe careful. (I guess you are not familar with Linux, build.xml syntax is very similar to the Linux)
但是有联接不上数据库???????为什么阿????? String url = "jdbc:mysql://localhost/atchik?user=root;password=123456"; Connection conn = DriverManager.getConnection(url);出错如下: Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error--------------------------------------------------------------------------------type Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception javax.servlet.ServletException: Server configuration denies access to data source at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.index$jsp._jspService(index$jsp.java:78) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
You don't know English at all? I've told you to check your calsspath. ${..}
String url = "jdbc:mysql://localhost/atchik?user=root;password=123456";
Connection conn = DriverManager.getConnection(url);出错如下:
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error--------------------------------------------------------------------------------type Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception javax.servlet.ServletException: Server configuration denies access to data source
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:78)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
I've told you to check your calsspath. ${..}
CLASSPATH=/usr/java/j2sdk1.4.0_01/lib:/usr/java/j2sdk1.4.0_01/jre/lib回复人: xxmm(晓箫) 我错在那里阿?????请指明阿,不懂????Class.forName();这个不出错的,是下一句联接数据库出错了!!请看清楚,你说得我还是不懂!!!!!!!!!注意:其他jsp程序均可运行,就是说apache+tomcat是没有问题的。
但是我的php已经在使用mysql,就是说我的mysql也是没有问题吧!!谁知道还有哪里出错了阿????????????
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://myhost:3306/dbname","user","passwd");
我是在resin下用,但也碰到和你同样的问题。后来也是放到jre/lib/ext下才可用