servlet 显示不了汉字
为什么显示出来的是"????"呢
该如何改这段程序?谢谢
public class MyTestServlet extends HttpServlet {
/**Initialize global variables*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
/**Process the HTTP Get request*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("<%@ page contentType=\"text/html;charset=GBK\"%>");
out.println("<html>");
out.println("<head><title>MyTestServlet</title></head>");
out.println("<body>");
out.println("<p>小应用程序</p>");
out.println("</body>");
out.println("</html>");
}
/**Clean up resources*/
public void destroy() {
}
}