An exception occurred processing

问题描述

HTTPStatus500-typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.apache.jasper.JasperException:AnexceptionoccurredprocessingJSPpage/Modpassword.jspatline9996:{97://检测旧密码输入是否正确98:out.println("<script>alert('testsuccess!');</script>");99:oldPas=newString(request.getParameter("Oldpassword").getBytes("ISO8859_1"),"GBK");100:Statementsmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);101:sql="select*fromadminwhereusername='"+session.getAttribute("username")+"'";102:ResultSetst=smt.executeQuery(sql);Stacktrace:org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rootcausejava.lang.NullPointerExceptionorg.apache.jsp.Modpassword_jsp._jspService(Modpassword_jsp.java:174)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)noteThefullstacktraceoftherootcauseisavailableintheApacheTomcat/6.0.26logs.

解决方案

解决方案二:
request.getParameter("Oldpassword")应该是这个返回的是null。你检查一下代码吧,分开写,不能保证不为null的话要做一下非null判断。

时间: 2024-10-26 06:19:46

An exception occurred processing的相关文章

SEVERE: Exception occurred during processing request: null java.lang.NullPointer

问题描述 大神门帮我看看这是什么情况我用的是SSI框架为什么一执行这语句就null 解决方案 解决方案二: 解决方案三:一执行try里的那条语句就报NULLname是有值的在线等大神解决方案四:快来人那····解决方案五:+1,同求啊

项目 jar包冲突(先检查web.xml 文件是否被自动替换)

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: An exception occurred processing JSP page /index.jsp

server-jsp报错-loginProcess.jsp at line 29

问题描述 jsp报错-loginProcess.jsp at line 29 type Exception report message An exception occurred processing JSP page /loginProcess.jsp at line 29 description The server encountered an internal error that prevented it from fulfilling this request. exception

数据库连接报错!!!怎么修改

问题描述 数据库连接报错!!!怎么修改 附上调试报告 怎么修改??? type Exception report message An exception occurred processing JSP page /WebContent/add.jsp at line 106 description The server encountered an internal error that prevented it from fulfilling this request. exception

select-jsp 连接 mysql 查询 报错500

问题描述 jsp 连接 mysql 查询 报错500 源代码: <%@ page contentType="text/html; charset=GB2312"%> <%@ page import="java.util.*,java.sql.*"%> <% request.setCharacterEncoding("GB2312"); //链接数据库程序 Class.forName("org.gjt.mm.

[java] javax.el.PropertyNotFoundException: Property &amp;#39;id&amp;#39; not found on type bean.Student

问题提出: 在使用MyEclipse开发Java Web时,调用DAO和Java Bean出现了如下错误: 严重: Servlet.service() for servlet [jsp] in context with path [/JDBCbyDao] threw exception [An exception occurred processing JSP page /student.jsp at line 3734: 35: <c:forEach items="${ studentL

java-jsp辨认不出程序中的中文

问题描述 jsp辨认不出程序中的中文 jsp中的中文辨认为乱码 if(op.equals(OP_SEARCH)||op.equals(OP_EDIT_SUB)||op.equals("add_sub")){ title = "搜索结果"; departList = new ArrayList(); Depart depart = (Depart) request.getAttribute(GET_SEARCH_RESULT); departList.add(depa

jsp连接数据库一直报错,求帮忙看下,谢谢

问题描述 jsp连接数据库一直报错,求帮忙看下,谢谢 <%@page language=""java"" import=""java.util.*"" pageEncoding=""utf-8""%><%@page import=""java.sql.*""%><html><body><% St

bean-求组织帮忙看看。。。大神,,你在哪

问题描述 求组织帮忙看看...大神,,你在哪 type Exception report message An exception occurred processing JSP page /displayinform.jsp at line 2 description The server encountered an internal error that prevented it from fulfilling this request. exceptionorg.apache.jaspe