zoukankan      html  css  js  c++  java
  • 1119整理

     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8"%>
     3 
     4     <%@ page import="java.util.Date" %>
     5     <%@ page import="java.text.SimpleDateFormat" %>
     6 
     7 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     8 <html>
     9 <head>
    10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    11 <title>Insert title here</title>
    12 </head>
    13 <body>
    14 
    15 <%
    16 
    17 // 声明和实例化了Date对象,获取系统时间
    18 
    19 // 在页面上显示当前时间
    20 // 声明和实例化了一个Date对象
    21 Date date = new Date();
    22 // 格式化日期
    23 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    24 
    25 String dt = sdf.format(date);
    26 
    27 %>
    28 
    29 输出当前时间:<%=dt %>
    30 
    31 <br>
    32 
    33 显示汉字!!!
    34 
    35 </body>
    36 </html>
    View Code
     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8" isErrorPage="true"%>
     3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     4 <html>
     5 <head>
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     7 <title>Insert title here</title>
     8 </head>
     9 <body>
    10 页面出错了!
    11 </body>
    12 </html>
    View Code
     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8" errorPage="error.jsp"%>
     3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     4 <html>
     5 <head>
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     7 <title>Insert title here</title>
     8 </head>
     9 <body>
    10 网页正文
    11 <br>
    12 <br>
    13 <%@
    14 include file="include.jsp"
    15 %>
    16 
    17 </body>
    18 </html>
    View Code

  • 相关阅读:
    docker学习
    LIS是什么?
    Android网络课程笔记-----定制通知系统
    java常用算法
    java正则表达式大全
    无需ROOT就能拿ANR日志
    Android网络课程笔记-----定制系统控件2
    Android网络课程笔记-----定制系统控件1
    Android网络课程笔记-----Fragment
    读《启示录》有感-----1
  • 原文地址:https://www.cnblogs.com/zxw0004/p/4979219.html
Copyright © 2011-2022 走看看