1
votes

I received a Java Web program from my friend and I'm trying to run and understand the code, but I can't seem to run it, here's the error message from Apache log

03-Jul-2014 20:33:51.873 SEVERE [http-nio-8084-exec-29] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [jsp] in context with path [/毕设] threw exception [The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application] with root cause org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:76) at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:215) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:123) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:411) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:469) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1455) at org.apache.jasper.compiler.Parser.parse(Parser.java:139) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:229) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:375) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:355) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:342) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Is there any way to know what the error is from these logs? If not, what information do I need to provide to know the error?

My web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<welcome-file-list>
<welcome-file>main_beforelogin.jsp</welcome-file>
</welcome-file-list>

<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>itemServlet</servlet-name>
<servlet-class>com.etc.servlet.itemServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>indexServlet</servlet-name>
<servlet-class>com.etc.servlet.indexServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>noticeServlet</servlet-name>
<servlet-class>com.etc.servlet.noticeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>usrServlet</servlet-name>
<servlet-class>com.etc.servlet.usrServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>adminLoginServlet</servlet-name>
<servlet-class>com.etc.servlet.adminLoginServlet</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>itemServlet</servlet-name>
<url-pattern>/servlet/itemServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>indexServlet</servlet-name>
<url-pattern>/servlet/indexServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>noticeServlet</servlet-name>
<url-pattern>/servlet/noticeServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>usrServlet</servlet-name>
<url-pattern>/servlet/usrServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>adminLoginServlet</servlet-name>
<url-pattern>/adminLoginServlet</url-pattern>
</servlet-mapping>



</web-app>
1
is there a jstl.jar available in the WEB-INF/lib directory ?Balaji Krishnan

1 Answers

1
votes

Verify if you put the (correct version) of jstl-xxx.jar inside your WEB-INF/lib directory of your application.