K
kxh
Unregistered / Unconfirmed
GUEST, unregistred user!
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Visit extends HttpServlet
{
int count=0;
String countstr="";
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
countstr=config.getInitParameter("count");
if(countstr==null)
countstr="0";
try{
count=Integer.parseInt(countstr);
}catch(Exception e)
{}
}
public voiddo
Get(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException;
{
res.setContentType("text/plain");
ServletOutputStream sos=res.getOutputStream();
PrintWriter pw=new PrintWriter(sos,true);
int localcount;
synchronized(this)
{
localcount=++count;
}
pw.println("你是第 "+localcount+"位访客");
}
编译时,总出现标题这个错误信息,不知道是会么原因??
import javax.servlet.*;
import javax.servlet.http.*;
public class Visit extends HttpServlet
{
int count=0;
String countstr="";
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
countstr=config.getInitParameter("count");
if(countstr==null)
countstr="0";
try{
count=Integer.parseInt(countstr);
}catch(Exception e)
{}
}
public voiddo
Get(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException;
{
res.setContentType("text/plain");
ServletOutputStream sos=res.getOutputStream();
PrintWriter pw=new PrintWriter(sos,true);
int localcount;
synchronized(this)
{
localcount=++count;
}
pw.println("你是第 "+localcount+"位访客");
}
编译时,总出现标题这个错误信息,不知道是会么原因??