日期:2014-05-18  浏览次数:20729 次

又碰到一个HTTP Status 500 问题
上次的500错误是因为有未结束的字符,在大家的帮忙下已经解决。
现在碰到个新的,希望帮帮忙看看什么问题。

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:   String   index   out   of   range:   -1
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

java.lang.StringIndexOutOfBoundsException:   String   index   out   of   range:   -1
java.lang.String.substring(String.java:1768)
java.lang.String.substring(String.java:1735)
org.apache.jsp.ticket_005fmanagement.ticket_005flist_jsp._jspService(ticket_005flist_jsp.java:189)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


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



------解决方案--------------------
在执行substring()时数组越界,检查下执行该函数的String,先打印出来就知道什么原因了
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html