当前位置: 技术问答>java相关
我的tomcat+mysql无法连通,急待解决……
来源: 互联网 发布时间:2015-11-03
本文导语: 我的jsp环境是w2k+j2sdk1.4.0_01+jakarta-tomcat-4.0-b1+mysql3.23.52,我已经把mysql-connector-java-2.0.14-bin.jar分别放进了tomcat/lib和jdk/jre/lib/ext,而且还放进了系统的CLASSPATH中,但当我执行对一个数据库的读测试时tomcat就会出现一大堆...
我的jsp环境是w2k+j2sdk1.4.0_01+jakarta-tomcat-4.0-b1+mysql3.23.52,我已经把mysql-connector-java-2.0.14-bin.jar分别放进了tomcat/lib和jdk/jre/lib/ext,而且还放进了系统的CLASSPATH中,但当我执行对一个数据库的读测试时tomcat就会出现一大堆出错代码:
A Servlet Exception Has Occurred
org.apache.jasper.compiler.ParseException: g:JSP_websindex.jsp(1,2) Attribute @ has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:565)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:683)
at org.apache.jasper.compiler.ParserController.figureOutJspDocument(ParserController.java:269)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:198)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:220)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:478)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:449)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:159)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:171)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:242)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
at java.lang.Thread.run(Thread.java:536)
下面是我写的这个jsp的源码:
请高手指点,谢谢!
A Servlet Exception Has Occurred
org.apache.jasper.compiler.ParseException: g:JSP_websindex.jsp(1,2) Attribute @ has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:565)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:683)
at org.apache.jasper.compiler.ParserController.figureOutJspDocument(ParserController.java:269)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:198)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:220)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:478)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:449)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:159)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:171)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:242)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
at java.lang.Thread.run(Thread.java:536)
下面是我写的这个jsp的源码:
请高手指点,谢谢!
|
jdbc放到classpath就可以了,要是你程序没有问题的话,你到mysql的站上去下个jdbc试一下
|
数据库的路径要写到环境变量里
|
mysql的jdbc驱动必须放在tomcat的lib下,不只威什么
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。