System.out.println(dateAndTime .toString())
用servletpublic void service(ServletRequest request, ServletResponse response)
throws ServletException, IOException {
String time =(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date())
PrintWriter out = response.getWriter()
out.println("<html>")
out.println("<body>")
out.println("<h1>")
out.println(time)
out.println("</h1>")
out.println("</body>")
out.println("</html>")
}
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)