学习笔记之jsp指令与动作
发布日期:2022-02-17 02:39:51 浏览次数:30 分类:技术文章

本文共 897 字,大约阅读时间需要 2 分钟。

jsp指令与动作

include指令

<%@ include file="URl"%>

例子

<%--  Created by IntelliJ IDEA.  User: HJCD  Date: 2020/5/16  Time: 13:39  To change this template use File | Settings | File Templates.--%><%@ page import=" java.util.*" contentType="text/html;charset=UTF-8" language="java" %><%@ page import="java.text.SimpleDateFormat" %><%    Date d = new Date();    SimpleDateFormat sdf =new SimpleDateFormat("yyyy年MM月dd日");    String s= sdf.format(d);    out.print(s);%>
<%--  Created by IntelliJ IDEA.  User: HJCD  Date: 2020/5/16  Time: 13:42  To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="java" %>    Title   

include


<%@include file="test.jsp"%>

include动作

page:要包含的页面

flush:被包含的页面是否从缓冲区读取

forward动作

等同于

request.getRequestDispatcher("/URL").forward(request,response);

param动作

常常与jsp:forward一起使用,作为其子标签

传新的参数 还可以修改旧的参数

转载地址:https://blog.csdn.net/qq_39814938/article/details/106163868 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:学习笔记之jsp状态管理之cookie
下一篇:tomcat容器学习

发表评论

最新留言

表示我来过!
[***.240.166.169]2024年04月26日 00时17分18秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章