我在JSP页面上调用类里面的方法出现这样的错误。
这是我调用方法的代码:
<%
List list = new ArrayList();
CliectArchivesSelectBean cliectArchivesSelectBean = new CliectArchivesSelectBean();
CliectArchivesSelectInterfaceImp cliectArchivesSelectInterfaceImp = new CliectArchivesSelectInterfaceImp();
list.add(cliectArchivesSelectInterfaceImp.SlectAZGX_JZQMC_2());
%>
<label>
<select name= "select ">
<c:forEach items= "list " var= "temp ">
<option> ${temp.jzq_SBMC} </option>
</c:forEach>
</select>
</label>
第一个错误:执行到数据库的连接字符串时出错。只报“驱动不适合”为什么会这样啊!
第二个错误:
2007-8-15 2:18:16 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet debugjsp threw exception
java.lang.NullPointerException at Model.CliectArchivesSelect.CliectArchivesSelectInterfaceImp.SlectAZGX_JZQMC_2(CliectArchivesSelectInterfaceImp.java:88)
at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
------解决方案--------------------驱动不适合,需要检查你数据库连接的方法
再问el表达式取值,该如何解决