import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class Test38 extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException{
doPost(request,response);
}
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException{
boolean b=true;
for(int i=1;i<1000;i++){
b=true;
if(i%59==1){
for(int j=2;j<i;j++){
if(i%j==0){
b=false;
break;
}
}
if(b){
System.out.println(i);
}
}
}
}
public static void main(String[]args)throws Exception{
Test38 t38=new Test38();
t38.doPost(null,null);
}
}
上述class我编译是可以通过,但是为什么运行通不过。请高手指点。
运行时错误页面如下: