JavaWeb项目HTTP Status 500页面报错怎么解决?

JavaWeb的学生成绩管理系统的用户更改密码处,点击输入完旧密码与新密码、点击“确认”按钮后HTTP Status 500页面报错
图片说明

![图片说明](https://img-ask.csdn.net/upload/201905/07/1557217424_579998.png)

图片说明

2个回答

这是 java 后台的错误,你可以看看 你的java代码除了什么问题。望采纳

异常信息很清楚,说CommonDAO 的174行访问列表时越界了,检查下那里的代码,修正下列表访问方式:
if(list!=null){
for(int i=0;i<list.size();i++)
}
列表访问时必须在列表元素范围内才行。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
HTTP Status 500 报错
昨天从书上抄了个JSP文件,昨天调试还没有问题。今天就一直报这个错误。。。查了下把 el-ri.jar jsp-api.jarrn拷过来也不管用。。。我用的是JDK1.6和TOMCAT6.。。。。rn root cause rnjava.lang.NoClassDefFoundError: javax/el/ELResolverrn java.lang.ClassLoader.defineClass1(Native Method)rn java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn java.net.URLClassLoader.defineClass(URLClassLoader.java:260)rn java.net.URLClassLoader.access$000(URLClassLoader.java:56)rn java.net.URLClassLoader$1.run(URLClassLoader.java:195)rn java.security.AccessController.doPrivileged(Native Method)rn java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)rn java.lang.ClassLoader.loadClass(ClassLoader.java:307)rn java.lang.ClassLoader.loadClass(ClassLoader.java:300)rn sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)rn java.lang.ClassLoader.loadClass(ClassLoader.java:300)rn java.lang.ClassLoader.loadClass(ClassLoader.java:252)rn java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:200)rn org.apache.jsp.login_jsp._jspInit(login_jsp.java:22)rn org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnrn即使我把一个最简单的htm文件,改成JSP文件,也是报这个错误。rnrnrnrnrn
HTTP Status 500 怎么解决
type Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletExceptionrn org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn com.quotation.util.EncodingFilter.doFilter(EncodingFilter.java:28)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn com.quotation.daoimp.UserLoginDaoImp.findUser(UserLoginDaoImp.java:22)rn com.quotation.serviceimp.UserLoginImp.findUser(UserLoginImp.java:18)rn com.quotation.action.LoginAction.one(LoginAction.java:31)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:585)rn org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)rn org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)rn org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn com.quotation.util.EncodingFilter.doFilter(EncodingFilter.java:28)rnrnrnJAVA页面的代码rnpublic class UserLoginDaoImp implements UserLoginDao rn List list=null;rn public List findUser(String name, String password) rn Session session=HibernateSessionFactory.getSession();rn Transaction tx=null;rn String hql=null;rn try rn hql="from User as a where a.YONGHU_YHMC='"+name+"' and a.YONGHU_YHMM='"+password+"'";rn tx=session.beginTransaction();rn list=session.createQuery(hql).list();rn tx.commit();rn return list;rn catch (HibernateException e) rn e.printStackTrace();rn if(tx!=null) tx.rollback();rn return null;rn finallyrn HibernateSessionFactory.closeSession();rn rn rnrn貌似是Session session=HibernateSessionFactory.getSession();这一句出了问题session取不到值rnrn我是一个新手,这是别人写的代码,先还可以运行的,我也没有改代码,就调试了之后就不知道怎么回事不能运行了rn谢谢那位大哥帮帮小弟吧,小弟在这跟你磕头了
jsp页面报错 HTTP Status 500
HTTP Status 500 - An exception oc