解决方案 »
- 关于js与iframe的问题
- 同一页面中多次引用同一个js脚本,存在冲突
- JSP中怎么从文件中的数据读到文本区中来
- 当大数量插入数据到数据库时,出现Error establishing socket错误
- 关于jxl操作excel的问题??在网上找了段程序,但运行后没有提示错误,但也没有生成excel表格。
- 一个关于synchronized小问题
- 在用jdk+resin时为什么运行是现显出来的是我的程序代码?
- 在jsp中(或其他语言中)=号和==号有什么区别?
- 急!!!??能实现对一文件夹所占的磁盘空间大小的监控吗?
- javabean的类文件放那里?
- 动态js加载css的问题
- 求教各位大侠一个JSP WAP网站下载问题
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"
//myDB为数据库名
Connection conn= DriverManager.getConnection(url);
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/表名","用户名","密码");
{
try
{
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost/数据库名?user=用户名&password=密码");
}catch(Exception e)
{
e.printStackTrace();
}
return conn;
}别忘了导如MySql驱动包
Syntax error, insert ";" to complete Statement
1: <%!
2: Connection con = null;
3: Statement stmt = null;
4: ResultSet rs = null;
An error occurred at line: 1 in the jsp file: /liuyan/Conn.jsp
String literal is not properly closed by a double-quote
1: <%!
2: Connection con = null;
3: Statement stmt = null;
4: ResultSet rs = null;
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)