当前位置 : 主页 > 编程语言 > java >

55exception对象

来源:互联网 收集:自由互联 发布时间:2022-07-17
建立一个test11对象 % @ page language = "java" import = "java.util.*" contentType = "text/html; charset=UTF-8" pageEncoding = "UTF-8" % ! DOCTYPE html html head meta charset = "ISO-8859-1" title Insert title here /title /head body h1 p
建立一个test11对象
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>pagecontext</h1>
<hr>
用户名:<%=pageContext.getSession().getAttribute("username") %><br>
<%
//跳转到注册页面
//pageContext.forward("test08.jsp");
pageContext.include("include.jsp");
%>
</body>
</html>建立一个include对象
<%@ page language="java" import="java.util.*,java.text.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path=request.getContextPath();
String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Date date=new Date();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日");
String s=sdf.format(date);
out.println(s);
%>


运行结果

55exception对象_java

 



上一篇:23.JSP 隐式对象
下一篇:没有了
网友评论