当前位置:网站首页>What is the function of the import command of the page directive in JSP?
What is the function of the import command of the page directive in JSP?
2022-08-02 08:38:00 【qq_25073223】
From:
In JSPWhat is the function of the import command of the page directive?
Introduction to jsp:
The full name of JSP is Java Server Pages, which is a dynamic web page technology. JSP is actually a file formed after inserting java code and JSP tags into html, and the file name ends with .jsp.In fact, JSP is a servlet.
Writing html in servlet is more painful, and writing JSP is like writing html, but compared with html, html can only provide users with static data, that is, static pages, and Jsp technology allows java to be nested in pagescode to provide users with dynamic data to form dynamic pages.It should be noted that it is best to only write java code for dynamic output in JSP.
Workflow of JSP
The process of converting JSP files into .java files and compiling them into .class files is all done by tomcat. There is a translation engine inside tomcat.When the JSP page is accessed for the first time, the translation engine converts it into a .java file and compiles a .class file.Then run the class file again.
The html code in JSP will be translated into out.write() in servlet
The following author describes the introduction of the import command function of the page directive in JSP, as follows:
import command function: Import multiple packages Notes: 1. The import command can specify multiple values at the same time, and multiple values can be used to separate them2. The import command can appear multiple times in the document
Example:
<%@ page import="java.util.*","java.io.*","java.awt.*" %>or<%@ page import="java.util.*"%><%@ page import="java.io.*","java.awt.*" %>
边栏推荐
- Analysis of software testing technology How far is Turing test from us
- MySQL 中 count() 和 count(1) 有什么区别?哪个性能最好?
- Biotin-EDA|CAS:111790-37-5| 乙二胺生物素
- Redisson实现分布式锁
- 积分商城商品供应商选择的三个要求
- Biotinyl Cystamine | CAS: 128915-82-2 | biotin cysteamine
- 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
- Redis分布式锁
- Biotin-C6-amine|N-biotinyl-1,6-hexanediamine|CAS: 65953-56-2
- [ansible] playbook explains the execution steps in combination with the project
猜你喜欢
随机推荐
IO进程线程->进程->day4
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
轴流式水轮机隐私政策
Business Intelligence Platform BI Business Intelligence Analysis Platform How to Choose the Right Business Intelligence Platform BI
@PostConstruct注解详解
USACO美国信息学奥赛竞赛12月份开赛,中国学生备赛指南
PyQt5 (a) PyQt5 installation and configuration, read from the folder and display images, simulation to generate the sketch image
Axial Turbine Privacy Policy
@FeignClient configuration参数配置
prometheus monitoring mysql_galera cluster
JSP页面中page指令contentPage/pageEncoding具有什么功能呢?
day_05模块
C语言基础_共用体
(Note) AXIS ACASIS DT-3608 Dual-bay Hard Disk Array Box RAID Setting
HCIP9_BGP增加实验
为什么都推荐使用wordpress, 而不是 phpcms 这些国内的CMS呢?
JSP页面中page指令有哪些属性及方法可使用呢?
QT web development - Notes - 3
那些年我们踩过的 Flink 坑系列
PyCharm使用教程(详细版 - 图文结合)