当前位置: 代码迷 >> Java Web开发 >> JSP部署完出错·
  详细解决方案

JSP部署完出错·

热度:95   发布时间:2016-04-16 22:15:07.0
JSP部署完报错···
报错的代码···
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 /jieyeu.jsp at line 64

61:                     <td align="center"><table width="96%" border="0" cellpadding="0" cellspacing="0">
62:                         <tr>
63:                           <td height="27">姓&nbsp;&nbsp;&nbsp;&nbsp;名:
64:                             <input name="readername" type="text" id="readername" value='<%=((readerbean)request.getAttribute("rs")).getReaderName()%>'></td>
65:                           <td>性&nbsp;&nbsp;&nbsp;&nbsp;别:
66:                             <input name="sex" type="text" id="sex" value='<%=((readerbean)request.getAttribute("rs")).getSex()%>'></td>
67:                           <td>读者类型:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause

java.lang.NullPointerException
org.apache.jsp.jieyeu_jsp._jspService(jieyeu_jsp.java:123)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.


这里的代码 <input name="sex" type="text" id="sex" value='<%=((readerbean)request.getAttribute("rs")).getSex()%>'>本来是双引号的后来改成单引号了·(一位大神教的他要去睡了就不打扰了)还是报错·有没有大神解决一下
------解决方案--------------------
request.getAttribute("rs") 没有取到值
以为你昨晚问题解决了呢,怎么还在这里呢?
去后台servlet断点下,看rs进setAttribute 时有没有值?
  相关解决方案