Tomcat在连接jsp时遇到异常,新手求教!
我想测试一下自己的Tomcat能否运行jsp,所以写了一个简单的test.jsp,然后在tomcat\conf\Catalina\localhost下新建了一个DBTest的xml文件,在Eclipse下新建DBTest项目,在web/WEB-INF添加web.xml文件,然后写了一个test.jsp
,dakai Tomcat,然后执行http://localhost:8080/DBTest/test.jsp,但是提示异常错误,求解,问题出在哪里?代码见2楼
异常:[code=Java][/code]HTTP Status 500 -
type Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql
cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:435)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:504)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1568)
org.apache.jasper.compiler.Parser.parse(Parser.java:132)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
------解决方案--------------------
请求没有到Servlet里,所以response不能够把信心输出到页面中。
估计你在页面中的传入参数设置错误,这个传入参数要跟Servlet里边的接收参数类型一致,能够对应起来才能把请求在Servlet中处理。
一点建议,呵呵,把程序中的参数再好好看看。
------解决方案--------------------http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
是不是jar文件没有引入呀。
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html