java数据库无法解析stmt_myeclipse无法解析JAVABEAN,无法解析在usebean中定义的对象id,我的bean是对数据库进行操作...

myeclipse无法解析JAVABEAN,无法解析在usebean中定义的对象id,我的bean是对数据库进行操作

码农的苦恼

45e3020af9af1140b1017f2205d095cc.png2020-02-24 10:25:38

错误报告:type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: /search.jsp(14,7) Invalid standard action org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88) org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1156) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448) org.apache.jasper.compiler.Parser.parse(Parser.java:133) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216) org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167) org.apache.jasper.compiler.Compiler.compile(Compiler.java:306) 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:317) 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)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.//bean文件:工程目录下src目录下beans包里的connect.javapackage beans;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;public class connect {public Connection getConnection() throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException{ Connection conn=null; Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver") .newInstance(); String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=cbook"; String user="sa"; String password=""; conn=DriverManager.getConnection(url,user,password); return conn;}public ResultSet select(String sql) throws Exception{ Connection conn=null; Statement stmt=null; ResultSet rs=null; try{ conn=getConnection(); stmt=conn.createStatement(); rs=stmt.executeQuery(sql); return rs; }catch(SQLException sqle){ throw new SQLException("select data exception;"+sqle.getMessage()); }catch (Exception e){ throw new SQLException("System e exception:"+e.getMessage()); }}};//jsp:

分享到

pHry8fJ+foRzMQHAAAAABJRU5ErkJgggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
相关推荐
©️2020 CSDN 皮肤主题: 1024 设计师:白松林 返回首页