tomcat页面出错
<%@ page contentType= "text/html;charset=GB2312 " %>
<%@ page import= "java.util.* " %>
<%@ page import= "java.lant.* " %>
<html>
<body bgcolor=cyan> <font size=1>
<%! double sum=0,i=1,j=1;
logn number=0;
synchronized void PI()
{
number++;
sum=sum+i/j;
j=j+2;
i=-i;
}
%>
<%
帮助计算PI();
%>
<p> 你是第 <%=number%> 个访问本站的客户
<BR>
<p> 计算PI的值为 <%=sum*4%>
</body>
</html>
我写的一个问题
却报了如下的错误请各位指教
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
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.ClassNotFoundException: org.apache.jsp.myapp.example2_005f6_jsp
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
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)
------解决方案--------------------number局部变量
------解决方案--------------------logn number=0; ==> long number=0