我已經使用JSP頁面創建了一個Web應用程序,但它拋出了下面的錯誤。JSP上的500錯誤
工作流:Index.jsp => login.jsp =>在JAVA文件中定義的calltomethods。
的index.jsp:
<html>
<body>
<form action="login.jsp">
<table>
<tr>
<td> System: <input type="text" name="cmsname"/> </td>
</tr>
<tr>
<td> User Name: <input type="text" name="username"/> </td>
</tr>
<tr>
<td> Password: <input type="password" name="password"/> </td>
</tr>
</table>
<input type = "submit" value = "Login">
</form>
<form action="download.jsp">
<input type = "submit" value = "Donwload File">
</form>
</body>
的login.jsp
<%@ page import = "com.aksl.internal.java.*" %>
<%@ page import = "javax.servlet.http.*" %>
<%@ page import = "java.io.IOException" %>
<html>
<body>
<%
String cmsname = request.getParameter("cmsname");
String username = request.getParameter("username");
String password = request.getParameter("password");
InitComCms initcmslogin = new InitComCms();
initcmslogin.setCMS(cmsname);
initcmslogin.setUserId(username);
initcmslogin.setPassword(password);
initcmslogin.callsToMethods();
%>
alert("User is logged in");
</body>
</html>
InitComCms.java
此文件具有所有登錄的邏輯到系統中和獲取詳細信息。這段代碼也將所有的細節寫入excel文件以及本地驅動器。
錯誤:
Nov 24, 2016 12:34:10 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/UserList41] threw exception [An exception occurred processing JSP page /login.jsp at line 13
10: String cmsname = request.getParameter("cmsname");
11: String username = request.getParameter("username");
12: String password = request.getParameter("password");
13: InitComCms initcmslogin = new InitComCms();
14: initcmslogin.setCMS(cmsname);
15: initcmslogin.setUserId(username);
16: initcmslogin.setPassword(password);
Stacktrace:] with root cause
java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Row
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:126)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
順便說一句,我是在java中一個新的蜜蜂。以下是來自login.jsp文件的第13行:
InitComCms initcmslogin = new InitComCms();
請大家幫忙。提前致謝。
類未找到異常org.apache.poi 在您的項目中包含此類 – dgk