访问这个页面时总是报页面有错,请大虾们帮看看,在线等!!!!!!!!!

lixj2009 2008-11-24 03:28:19
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*" %>
<%@ page errorpage="/public/error.jsp"%>
<%@ include file="/public/checkvalidadmin.jsp"%>
<%@ include file="/public/checkvalidadmin8.jsp"%>
<jsp:useBean id="conn" scope="page" class="test.ConnOracle"/>

<%!
ResultSet rs=null;
String username="";
String truename="";
String password="";
String priv="";
String oper="";
String sql="";
int result=0;
%>
<html>
<head>
<title>权限管理</title>
<link rel="stylesheet" type="text/css" href="../public/styles.css">
</head>

<body class="ss">
<center>
<%
request.setCharacterEncoding("GBK");
username=request.getParameter("username");
truename=request.getParameter("truename");
password=request.getParameter("password");
priv=request.getParameter("priv");
oper=request.getParameter("oper");
if(username==null || username.equals("")){
out.println("<center>");
out.println("请进行合法操作!");
out.println("</center>");
return;
}
try{
rs=conn.executeQuery("select * from test_admin where loginname='"+username+"'");
if(!rs.next()){
out.println("<center>");
out.println("数据库没有用户名为"+username+"的用户!<br>");
out.println("单击这里<a href=javascript:history.back()>返回</a><br>");
out.println("</center>");
}else{
if(oper.equals("修改")){
sql="update test_admin set priviledge="+ priv;
sql+=",truename='"+truename+"',";
sql+="password='"+password+"'";
sql+="where loginname='"+username+"'";
}else if(oper.equals("删除")){
sql="delete from test_admin";
sql+="where loginname='"+username+"'";
}
result=conn.executeUpdate(sql);
}
}catch(Exception ee){
out.println("<center>");
out.println("管理员账号信息更新失败!<br><br>");
out.println("请将下列信息告知管理员<br><br>");
out.println(ee.toString()+"<br><br>");
out.println("单击这里<a href=javascript:history.back()>返回</a><br>");
out.println("</center>");
}
%>
<jsp:forward page="accountmanager.jsp"/>
</center>
</body>
</html>
...全文
142 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluefcxt 2008-11-25
  • 打赏
  • 举报
回复
我推荐楼主自己DEBUG一下先
ganglong99 2008-11-25
  • 打赏
  • 举报
回复
Source not found for JspServletWrapper.handleJspException(Exception) line: 436

没有找到资源,你看看你的页面中包含的其他几个页面都存在吗?还有路径写对没?
<%@ page errorpage="/public/error.jsp"%>
<%@ include file="/public/checkvalidadmin.jsp"%>
<%@ include file="/public/checkvalidadmin8.jsp"%>

<jsp:forward page="accountmanager.jsp"/> 这个jsp页面路径对吗?
lixj2009 2008-11-25
  • 打赏
  • 举报
回复
我都检查好多遍了,都没有发现错误,郁闷啊!!!!!!
fys249931556 2008-11-24
  • 打赏
  • 举报
回复
仔细检查下页面。。。
lixj2009 2008-11-24
  • 打赏
  • 举报
回复
以下是调试时候报的异常
Daemon Thread [http-8080-Processor24] (Suspended (exception NullPointerException))
JspServletWrapper.handleJspException(Exception) line: 436
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean) line: 371
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String, Throwable, boolean) line: 315
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 265
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 803
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 269
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 188
StandardWrapperValve.invoke(Request, Response) line: 210
StandardContextValve.invoke(Request, Response) line: 174
StandardHostValve.invoke(Request, Response) line: 127
ErrorReportValve.invoke(Request, Response) line: 117
StandardEngineValve.invoke(Request, Response) line: 108
CoyoteAdapter.service(Request, Response) line: 151
Http11Processor.process(InputStream, OutputStream) line: 870
Http11Protocol$JmxHttp11ConnectionHandler(Http11BaseProtocol$Http11ConnectionHandler).processConnection(TcpConnection, Object[]) line: 665
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 528
LeaderFollowerWorkerThread.runIt(Object[]) line: 81
ThreadPool$ControlRunnable.run() line: 685
ThreadWithAttributes(Thread).run() line: 619

错误信息:Source not found for JspServletWrapper.handleJspException(Exception) line: 436




lixj2009 2008-11-24
  • 打赏
  • 举报
回复
错误信息:Source not found for JspServletWrapper.handleJspException(Exception) line: 436


谢谢各位大虾帮助!!!!!!!!!!!!!
aizhu1314 2008-11-24
  • 打赏
  • 举报
回复
最好不要在jsp页内用如此所的<%,很容易出错的.
yanbin1016 2008-11-24
  • 打赏
  • 举报
回复
或者是你粘贴代码的时候 本身有空格 但这里不给显示????
yanbin1016 2008-11-24
  • 打赏
  • 举报
回复
sql+="password='"+password+"'";
sql+="where loginname='"+username+"'"; //在这句里面加上一个空格 sql+="where loginname='"+username+"'";

sql="delete from test_admin";
sql+="where loginname='"+username+"'"; //在这句里面加上一个空格 sql+="where loginname='"+username+"'";


因为你没给出错误提示 没法确定是不是这的问题 不过个人觉得你这样拼SQL语句有问题 ,连接到一起后 where条件关键字和上一句连到一起 SQL语法报错
saiwu 2008-11-24
  • 打赏
  • 举报
回复
LZ要把错误信息贴上来啊!!!!
ganglong99 2008-11-24
  • 打赏
  • 举报
回复
<%!
ResultSet rs=null;
String username="";
String truename="";
String password="";
String priv="";
String oper="";
String sql="";
int result=0;
%>

将“!”去掉试试。
zhendongloveyou 2008-11-24
  • 打赏
  • 举报
回复
什么错?!
ganglong99 2008-11-24
  • 打赏
  • 举报
回复
报的什么错?

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧