首先是 正确运行的信息
2012-6-1 22:28:30 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\MyEclipse\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;D:\MyEclipse\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201012172208\tomcat\bin
2012-6-1 22:28:30 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-6-1 22:28:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 442 ms
2012-6-1 22:28:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-6-1 22:28:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2012-6-1 22:28:31 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-6-1 22:28:31 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-6-1 22:28:31 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/19 config=null
2012-6-1 22:28:31 org.apache.catalina.startup.Catalina start
信息: Server startup in 519 ms
然后是 错误时的信息:
2012-6-2 14:19:43 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\MyEclipse\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;D:\MyEclipse\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201012172208\tomcat\bin
2012-6-2 14:19:43 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-6-2 14:19:43 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 657 ms
2012-6-2 14:19:43 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-6-2 14:19:43 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2012-6-2 14:19:44 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\MyEclipse\WebAPP\.metadata\.me_tcat\webapps\ContainerTransportSystem\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2012-6-2 14:19:45 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-6-2 14:19:45 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-6-2 14:19:45 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/22 config=null
2012-6-2 14:19:45 org.apache.catalina.startup.Catalina start
信息: Server startup in 1789 ms
2012-6-2 14:19:50 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.login_jsp._jspInit(login_jsp.java:23)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
2 个解决方案
#1
1.路径上面有D:\MyEclipse\WebAPP\.metadata\.me_tcat\webapps\ContainerTransportSystem\WEB-INF\lib\javax.servlet.jar。
2.再说你的项目中的login.jsp空指针异常。
3.建议不要使用自带的tomcat。
2.再说你的项目中的login.jsp空指针异常。
3.建议不要使用自带的tomcat。
#2
对于1:我进去看过了,删掉之后,再次打开服务器的时候还是会生成。
对于2:就算我是纯HTML的Login,系统也报指针错。
对于3:移植起来麻烦么,需要改动哪些地方?
下面是login.jsp
<%@ page language="java" import="java.util.*" contentType="text/html;charset=GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>集装箱运输系统</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<h2>集装箱运输系统</h2>
<form action="Login" method="post">
<input type="radio" name="usertype" id="user1" value="Owner" checked="true"><label for="user1">货主</label>
<input type="radio" name="usertype" id="user2" value="Forwarders"><label for="user2">货代</label>
<input type="radio" name="usertype" id="user3" value="ShipAgency"><label for="user3">船代</label><br/>
<input type="text" name="uid" maxlength=20 style="width:150"><br/>
<input type="password" name="pwd" maxlength=32 style="width:150">
<%
String temp = (String)session.getAttribute("login");
if (temp!=null) {
if ("failed".equals(temp))
out.println("<font color='red'>帐号或者密码错误,请重新登陆</font>");
}
%>
<br/><input type="submit" value="登陆">
<input type="reset" value="取消">
<a href="register.jsp" target="_blank">[<font color="red">注册</font>]</a>
</form>
</body>
</html>
#1
1.路径上面有D:\MyEclipse\WebAPP\.metadata\.me_tcat\webapps\ContainerTransportSystem\WEB-INF\lib\javax.servlet.jar。
2.再说你的项目中的login.jsp空指针异常。
3.建议不要使用自带的tomcat。
2.再说你的项目中的login.jsp空指针异常。
3.建议不要使用自带的tomcat。
#2
对于1:我进去看过了,删掉之后,再次打开服务器的时候还是会生成。
对于2:就算我是纯HTML的Login,系统也报指针错。
对于3:移植起来麻烦么,需要改动哪些地方?
下面是login.jsp
<%@ page language="java" import="java.util.*" contentType="text/html;charset=GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>集装箱运输系统</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<h2>集装箱运输系统</h2>
<form action="Login" method="post">
<input type="radio" name="usertype" id="user1" value="Owner" checked="true"><label for="user1">货主</label>
<input type="radio" name="usertype" id="user2" value="Forwarders"><label for="user2">货代</label>
<input type="radio" name="usertype" id="user3" value="ShipAgency"><label for="user3">船代</label><br/>
<input type="text" name="uid" maxlength=20 style="width:150"><br/>
<input type="password" name="pwd" maxlength=32 style="width:150">
<%
String temp = (String)session.getAttribute("login");
if (temp!=null) {
if ("failed".equals(temp))
out.println("<font color='red'>帐号或者密码错误,请重新登陆</font>");
}
%>
<br/><input type="submit" value="登陆">
<input type="reset" value="取消">
<a href="register.jsp" target="_blank">[<font color="red">注册</font>]</a>
</form>
</body>
</html>