当前位置:网站首页>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.*" %>
边栏推荐
- 普林斯顿微积分读本03第二章--编程实现函数图像绘制、三角学回顾
- Seleniu screenshots code and assign name to the picture
- 抓包工具Charles修改Response步骤
- C语言_条件编译
- [ansible]playbook结合项目解释执行步骤
- [ansible] playbook explains the execution steps in combination with the project
- Figure robot software digital twin station oil and gas pipelines, oil and gas transportation control platform
- MySQL ODBC驱动简介
- BGP solves routing black hole through MPLS
- oracle的sql改成mysql版本
猜你喜欢
随机推荐
优炫数据库的逻辑复制怎么样?
商业智能平台BI 商业智能分析平台 如何选择合适的商业智能平台BI
Biotin hydrazide HCl|CAS:66640-86-6|Biotin-hydrazide hydrochloride
shell中计算命令详解(expr、(())、 $[]、let、bc )
Flink 系统性学习笔记系列
Biotin-LC-Hydrazide|CAS:109276-34-8|生物素-LC-酰肼
Elasticserch 自定义字段,用户会频繁的创建和删除字段,怎么设计mapping?
OneNote Tutorial, How to Create More Spaces in OneNote?
Database triggers and transactions
轴流式水轮机隐私政策
Redis分布式锁入门
JSP页面中page指令contentPage/pageEncoding具有什么功能呢?
[OC学习笔记]weak的实现原理
node(三) 模块化
[ansible]playbook结合项目解释执行步骤
【开源项目】X-TRACK源码分析
科技云报道:实现元宇宙,英伟达从打造基础建设平台开始
MySQL Workbench 安装及使用
What is NoSQL?Databases for the cloud-scale future
Three types of [OC learning notes] Block