整个tomcat中都没有我怀疑是否没有创建

解决方案 »

  1.   

    import部分省略public class Servlet1 extends HttpServlet {
       public void doGet(HttpServletRequest req, HttpServletResponse res)
             throws ServletException, IOException {
          boolean created = new File("init.myfile").createNewFile();
          res.getWriter().println("created? " + created);
       }
       
       public void doPost(HttpServletRequest req, HttpServletResponse res)
             throws ServletException, IOException {
          doGet(req, res);
       }
    }
      

  2.   

    我用的是JBOSS3.21,集成TOMCAT的。
    在JBOSS安装目录下/BIN,生成了一个init.myfile文件,是真的.