JSP显示当前系统时间的四种方式:
第一种java内置时间类实例化对象:
<%@ page language=java import=java.util.* pageEncoding=UTF-8%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+://+request.getServerName()+:+request.getServerPort()+path+/;
%>
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4
1