日期:2014-05-19  浏览次数:20907 次

页面显示正常,后台却输出Servlet.service() for servlet [jsp] in context with path [/luntan] t
不要看代码多,其实 就那么几行诗重要的 ,只是为了方便 我全粘上去了 谢谢啦

我做了一个注册界面 register.jsp 在地址栏输入后,页面显示正常,后台却显示错误
register.jsp 代码如下:<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
  <base href="<%=basePath%>">
   
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册网页</title>
</head>
<link href="css/1.css" rel="stylesheet" type="text/css" />
<body><center>
<table cellspacing=0 width="1043" border="0" align="center" bordercolor="#308ECB">
  <tr bgcolor=#308ECB>
  <jsp:include page="head.jsp"></jsp:include>
  </tr>
 <tr> <jsp:include page="register1.jsp"></jsp:include>
  </tr></table></center>
</body>
</html>



head.jsp代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>
  <base href="<%=basePath%>">
   
  <title>My JSP 'head.jsp' starting page</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
<!--
a:link {font-family:"宋体";text-decoration:none}
a:visited {font-family:"宋体";text-decoration:none}
a:hover {font-family:"宋体";text-decoration:none}
-->
</style>
  </head>
  
  <body>
  <center>
  <table width="1043" border="0">
  <tr>
  <td width="60"><div id="my" align="center"><a href="#">技术论坛首页</a></div></td>
  <td width="50"><div align="center"><a href="#">资讯</a></div></td>
  <td width="50"><div align="center"><a href="#">论坛</a></div></td>
  <td width="50"><div align="center"><a href="#">博客</a></div></td>
  <td width="50"><div align="center"><a href="#">下载</a></div></td>
  <td width="50"&