你show一下是show到了服务器端打开窗口相关信息当然是用日志工具了,Log4j是个好东西
如果你想在Log4j用窗口显示调试信息可以用Log4j的LF5Appender详情请参考http://blog.csdn.net/Didizyp/archive/2005/08/28/466730.aspx

解决方案 »

  1.   

    我是想在服务器端打开窗口哦~
    为什么不行呢?^_^log4j可以做到用窗口即时显示调试信息吗?
    我看看去……^_^
    谢谢!
      

  2.   

    还是不行啊!
    就是显示不出窗口来……^_^
    是不是在Servlet里有什么机制限制的窗口的显示啊?^_^
      

  3.   

    //看下面的代码
    package test;import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.swing.*;
    import java.io.*;public class Test extends HttpServlet
    {
    public void init(ServletConfig config) throws ServletException{
    super.init(config);

    //这里,想在服务器端显示个窗口
    JFrame frame = new JFrame("Hello~");
    frame.setBounds(100, 100, 400, 300);
    frame.setVisible(true);
    //结果没有错误,但是窗口怎么都出不出啊~
    } public void destroy(){
    super.destroy();
    } public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException{ PrintWriter out = res.getWriter();
    out.println("hello~");
    }
    }