在TOMCAT测试中遇到的
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
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
JSP界面代码是
<%@ page contentType= "text/html; charset=gb2312 " %>
<%@ page import= "java.sql.* "%>
<jsp:useBean id= "con " class= "com.bwm.db.Conn " scope= "page "/>
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<link href= "css/default.css " rel= "stylesheet " type= "text/css ">
</head>
<body background= "images/bg.jpg ">
<table width= "100% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td height= "27 " colspan= "3 " align= "right "> <div id= "link "> </div> </td>
</tr>
<tr>
<td width= "1 " height= "36 " background= "images/gbnavl.gif "> </td>
<td width= "99% " background= "images/gbnavm.gif "> <div id= "link1 "> <a href= "student/ "> 学生注册 </a> <a href= "company/ "> 企业注册 </a> </div> </td>
<td width= "1 " background= "images/gbnavr.gif "> </td>
</tr>
</table>
<table width= "100% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td height= "50 " bgcolor= "#FFFFFF "> <div id= "top "> <img src= "images/top.gif " width= "340 " height= "38 "> </div> </td>
</tr>
</table>
<table width= "100% " height= "400 " border= "0 " cellpadding= "0 " cellspacing= "0 ">