| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 563 人关注过本帖
标题:[求助] 关于500错误,希望给予解答,万分感谢2
只看楼主 加入收藏
honeyboy
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-7-18
收藏
 问题点数:0 回复次数:0 
[求助] 关于500错误,希望给予解答,万分感谢2

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.handleJspException(JspServletWrapper.java:476)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.NullPointerException
org.apache.jsp.login_jsp._jspService(login_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
Apache Tomcat/5.5.23

原码如下
<meta http-equiv="refresh" content="1;url=default.htm">
<%@ page contentType="text/html; charset=gbk" %>
<%@ page language="java" import="java.sql.*"%>

<jsp:useBean id="j" scope="application" class="jdbc.jdbc"/>
<jsp:useBean id="m" scope="application" class="MD5.MD5"/>

<%
String user_name=new String(request.getParameter("name").getBytes("ISO8859_1"), "GBK");
String user_key=new String(request.getParameter("key").getBytes("ISO8859_1"), "GBK");
String key_confirm=new String(request.getParameter("key_confirm").getBytes("ISO8859_1"), "GBK");
String user_enterprise_name=new String(request.getParameter("enterprise").getBytes("ISO8859_1"), "GBK");
String s="0";
int count=0;
user_key=m.getMD5ofStr(user_key);
try{
Connection con=j.getConnection();

Statement statement=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

String checksql="select user_name from user_info where user_name='"+user_name+"'";

ResultSet r=statement.executeQuery(checksql);

while(r.next())
{
count++;
}

if(count!=0)
{
out.print("对不起,该用户名以存在!请重新注册!");
}
else
{
String upsql="insert into user_info (user_name,user_key,user_enterprise_name,s) values ('"+user_name+"','"+user_key+"','"+user_enterprise_name+"','"+s+"')";


statement.executeUpdate(upsql);

}
j.releaseConnection(con);

out.print("注册成功!");
}


catch(SQLException ee){out.print("对不起!和以注册企业名称重复");}

%>

搜索更多相关主题的帖子: 解答 感谢 
2007-07-18 23:59
快速回复:[求助] 关于500错误,希望给予解答,万分感谢2
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026200 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved