当前位置:网站首页>JSP中page指令的import命令具有什么功能呢?
JSP中page指令的import命令具有什么功能呢?
2022-08-02 08:01:00 【qq_25073223】
转自:
JSP中page指令的import命令具有什么功能呢?
jsp简介:
JSP全称是Java Server Pages,是一种动态网页技术,JSP其实就是在html中插入了java代码和JSP标签之后形成的文件,文件名以.jsp结尾。其实JSP就是一个servlet。
在servlet中编写html比较痛苦,而写JSP就像在写html,但它相比html而言,html只能为用户提供静态数据即静态页面,而Jsp技术允许在页面中嵌套java代码,为用户提供动态数据,从而形成动态页面。需要注意的是最好只在JSP中编写动态输出的java代码。
JSP的工作流程
将JSP文件转换为.java文件并将其编译为.class文件的过程都是由tomcat完成的,在tomcat内部有一个翻译引擎,当JSP页面第一次被访问时由翻译引擎转换为.java文件并编译出.class文件。之后再运行该class文件。
在JSP中的html代码都会翻译到servlet中的out.write()中
下文笔者讲述JSP中page指令的import命令功能简介说明,如下所示:
import命令功能: 导入多个包 注意事项: 1.import命令可以同时指定多个值,多个值之间使用都好进行分隔 2.import命令可在文档中出现多次
例:
<%@ page import="java.util.*","java.io.*","java.awt.*" %> 或 <%@ page import="java.util.*"%> <%@ page import="java.io.*","java.awt.*" %>
边栏推荐
- 学习笔记(7)Funtion
- USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
- IO process thread -> process -> day4
- I.MX6U-ALPHA开发板(EPIT定时器实验)
- 原型模式
- 小说里的编程 【连载之二十五】元宇宙里月亮弯弯
- MySQL Workbench 安装及使用
- Biotinyl Cystamine | CAS: 128915-82-2 | biotin cysteamine
- Technology Cloud Report: To realize the metaverse, NVIDIA starts from building an infrastructure platform
- Biotin hydrazide HCl|CAS:66640-86-6|Biotin-hydrazide hydrochloride
猜你喜欢
A young man with strong blood and energy actually became a housekeeper. How did he successfully turn around and change careers?
3D激光slam:LeGO-LOAM---地面点提取方法及代码分析
Biotin-C6-amine|N-生物素基-1,6-己二胺|CAS:65953-56-2
MySQL常见索引类型
Kind of weird!Access the destination URL, the host can container but not
Write a small game in C (three chess)
cas:139504-50-0 美登素DM1|Mertansine|
Biotin-EDA|CAS:111790-37-5| Ethylenediamine biotin
设置工作模式与环境(中):建造二级引导器
(Note)阿克西斯ACASIS DT-3608双盘位硬盘阵列盒RAID设置
随机推荐
R语言plotly可视化:plotly可视化回归模型实际值和回归预测值的散点图分析回归模型的预测效能、一个好的模型大部分的散点在对角线附近(predicted vs actual)
Biotinyl Cystamine|CAS:128915-82-2|生物素半胱胺
积分商城商品供应商选择的三个要求
Flink 系统性学习笔记系列
redis高阶使用之Redisson分布式锁源码解析
Elasticserch 自定义字段,用户会频繁的创建和删除字段,怎么设计mapping?
WebGPU 导入[2] - 核心概念与重要机制解读
R language plotly visualization: use the plotly visualization model to predict the true positive rate (True positive) TPR and false positive rate (False positive) FPR curve under different thresholds
prometheus监控mysql_galera集群
Biotin hydrazide HCl|CAS:66640-86-6|生物素-酰肼盐酸盐
近期在SLAM建图和定位方面的进展
Biotin-C6-amine|N-生物素基-1,6-己二胺|CAS:65953-56-2
如何建立私域流量?私域流量对企业有什么好处?
MySQL事务隔离级别详解
工程师如何对待开源 --- 一个老工程师的肺腑之言
暂未找到具体原因但解决了的bug
十大免费cms建站系统介绍推荐
Shell becomes canonical and variable
[ansible] playbook explains the execution steps in combination with the project
基本SQL语句(一篇就够了)