我编写了一个简单的servlet,代码如下:
public class MyServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
// [do stuff with the PrintWriter]
out.close();
}
}
关闭PrintWriter
输出流是必要的吗?如果我不关闭流,那会影响之后的任何事情吗?