DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39581>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39581 Summary: Maybe the Jasper translate jsp to wrong java code. Product: Tomcat 5 Version: 5.5.17 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] 1. In my first jsp, i write the the two lines code: <jsp:useBean class="cn.edu.zqu.SimpleBean" id="simpleBean" scope="session" /> <jsp:getProperty name="simpleBean" property="university" /> it works. -------------------- the translated code is: out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((cn.edu.zqu.SimpleBean)_jspx_page_context.findAttribute("simpleBean")).getUniversity()))); 2. But, in my second jsp, i reuse the simpleBean: <jsp:getProperty name="simpleBean" property="sex"/> the jsp dosen't work. -------------------- the translated code is: out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(_jspx_page_context.getAttribute("simpleBean", PageContext.PAGE_SCOPE), "sex"))); ********************************************* exception org.apache.jasper.JasperException: Attempted a bean operation on a null object. org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 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 org.apache.jasper.JasperException: Attempted a bean operation on a null object. org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:601) org.apache.jsp.studentInfo_jsp._jspService(studentInfo_jsp.java:75) 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:332) 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) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]