我有這樣的例子,顯示在控制檯can'i如何在文件中,而不是顯示它保存結果一個PrintWriter在控制檯
HttpServletResponse presponse
presponse.setContentType(text/xml; charset=UTF-8)
PrintWriter lout = presponse.getWriter();
lout.println(var);
lout.close();
的結果,但我想結果保存在下載文件而不是將其顯示在控制檯上 你能幫我嗎
感謝您的回答 – Yanni