最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose

来源:动视网 责编:小采 时间:2020-11-27 16:03:25
文档

javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose

javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose: ); for(int i =0;i ); } %> 严重: Servlet.service() for servlet jsp threw exception com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in you
推荐度:
导读javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose: ); for(int i =0;i ); } %> 严重: Servlet.service() for servlet jsp threw exception com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in you


  <% //Add column names to the table while(rsColumns.next()){%>  <%} %>  <% Statement statement =dBBeanId.getConn().createStatement(); ResultSet rs = statement.executeQuery( 	 "select * from" + tableName); 	 //Get column count 	 int columnCount =rs.getMetaData().getColumnCount(); 	 //Store rows to rowData 	 while(rs.next()){ out.println(""); for(int i =0;i  <% } out.println(""); } %> 
<%= rsColumns.getString("COLUMN_NAME") %>
<%= rs.getObject(i+1) %>




严重: Servlet.service() for servlet jsp threw exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from_buses' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
at org.apache.jsp.BrowseTable_jsp._jspService(BrowseTable_jsp.java:102)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:4)
at java.lang.Thread.run(Unknown Source)


回复讨论(解决方案)

似乎是因为from后面少了空格
"select * from" + tableName);
-----------------------------------
"select * from " + tableName);

文档

javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose

javaweb有个小错误啊,不知道哪里有错,新手求大神_html/css_WEB-ITnose: ); for(int i =0;i ); } %> 严重: Servlet.service() for servlet jsp threw exception com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in you
推荐度:
标签: 错误 html css
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top