引用:
原帖由 twinsen2000 於 2007-5-18 04:28 發表
你打錯字~ 係IOException,唔係IOExpection呀~!!
你copy我呢個試多次啦~
import java.io.*;
class Sample13
{
public static void main(String args[]) throws IOException
...
以下的程式又不知道出了什麼問題??
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class Sample055MessageFilter implements Filter {
public void init(FilterConfig config)
{
}
public void destroy()
{
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws ServletException, IOException
{
Date today=new Date();
PrintWriter out=((HttpServletResponse)response).getWriter();
out.println("<center><span style=\"font-size:18pt;color:white;background-color:#888888\">");
out.println("Cool Company Inc.,</span><p>");
out.println(today);
out.println("</center><p>");
chain.doFilter(request,response);
}
}