public class SampleServlet extends HttpServlet {
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException {
response.setContentType("text/html;charset=Windows-31J");
response.addDateHeader("Last-Modified", (new Date()).getTime());
PrintWriter out = response.getWriter();
out.println("<html><body>");
out.println("てすと");
out.println("</body></html>");
}
}
|