Sir, i am facing following problem, org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 50 in the jsp file: /refreshPage.jsp Unreachable code 47: </tr> 48: <%}x++; %> 49: </c:forEach> 50: <%Thread.sleep(60000);} %> 51: </table> 52: </body> 53: </html> Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Jul 7, 2011 10:08:22 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception Following is my code: refreshPage.jsp: <% RealTimeDAO rdao=new RealTimeDAO(); rdao.store(); %> <table border="5"> <tr><th>CAMPAIGN_ID</th><th>RECORD_ID</th><th>SESSION_ID</th><th>CONNECTEDPHONE</th><th>SESSION_DURATION</th></tr> <% while(true){ int x=1; List<RtChannels> list=rdao.getRecords(); pageContext.setAttribute("list",list); %> <c:forEach var="rp" items="${list}"> <%if(x%2==0){ %> <tr bgcolor="gray"> <td><c:out value="${rp.compaignID}"/></td> <td><c:out value="${rp.recordID}"/></td> <td><c:out value="${rp.sessionID}"/></td> <td><c:out value="${rp.connectedPhone}"/> </td><td><c:out value="${rp.sessionDuration}"/></td> </tr> <%}if(x%2==1){ %> <tr bgcolor="blue"> <td><c:out value="${rp.compaignID}"/></td> <td><c:out value="${rp.recordID}"/></td> <td><c:out value="${rp.sessionID}"/></td> <td><c:out value="${rp.connectedPhone}"/></td> <td><c:out value="${rp.sessionDuration}"/></td> </tr> <%}x++; %> </c:forEach> <%Thread.sleep(60000);} %> </table> Please help me in resolving this problem. Please send your answer to [email protected]
Ads