快快帮我解决呀???

evlen 2003-03-26 02:36:03
请问这是个什么问题 :
Error: 500
Location: /tongxunlu/success.jsp
Internal Servlet Error:

javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at tongxunlu.success_1._jspService(success_1.java:107)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:539)
Root cause:
java.lang.NullPointerException
at tongxunlu.success_1._jspService(success_1.java:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:539)

该页面的源程序如下:
<%@ page contentType="text/html;charset=gb2312"%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>祝贺你已经登记成功</title>
</head>

<body>
<%@ page language="java" import="java.sql.*"%>
<jsp:useBean id="addBean" scope="page" class="firm.firm"/>
<%
String name=new String(request.getParameter("username").getBytes("8859_1"));
String birthday=new String(request.getParameter("birthday").getBytes("8859_1"));
String telephone=new String(request.getParameter("telephone").getBytes("8859_1"));
String address=new String(request.getParameter("address").getBytes("8859_1"));
String hometelephone=new String(request.getParameter("hometelephone").getBytes("8859_1"));
String qq=new String(request.getParameter("qq").getBytes("8859_1"));
String email=new String(request.getParameter("email").getBytes("8859_1"));
String yijian=new String(request.getParameter("yijian").getBytes("8859_1"));
String strSQL="insert into tongxunlu(name,birthday,telephone,address,hometelephone,qq,email,yijian) values('"+name+"','"+birthday+"','"+telephone+"','"+address+"','"+hometelephone+"','"+qq+"','"+email+"','"+yijian+"')";
addBean.executeUpdate(strSQL);
out.print("你的资料已经保存到数据库中,谢谢!");
%>
<div align="center">
<center>
<table border="1" width="479" height="71" bgcolor="#99CCFF">
<tr>
<td width="479" height="36">         
<font face="楷体_GB2312" size="4" color="#000000">祝贺你已经登记成功,谢谢你的合作!</font></td>
</tr>
<tr>
<td width="479" height="23">
<table border="1" width="100%" height="23">
<tr>
<td width="50%" height="17"><font face="楷体_GB2312" size="4" color="#000000">返回登记页面</font></td>
<td width="50%" height="17"><font face="楷体_GB2312" size="4" color="#000000">进入本班主页</font></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>

</body>

</html>
...全文
12 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
tanguangbin 2003-03-26
对不起没有看到你已经解决了,我运行没有问题.不是来混分的.不用给我分!
回复
tanguangbin 2003-03-26
没有问题!
回复
evlen 2003-03-26
我搞定了,是我主页的变量写成了name="yourname",而不是name="username",麻烦大家了
回复
acefr 2003-03-26
对空值进行了操作。
回复
shaopin 2003-03-26
request.getParameter得到的数据至少有一个是空值。
回复
peppi 2003-03-26
如果你用的是TOMCAT,你到work下找你的文件success_1.java,然后看107行是哪一句
找一下,估计是BEAN里的错.
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2003-03-26 02:36
社区公告
暂无公告