当前位置:网站首页>EL表达式改进JSP
EL表达式改进JSP
2022-07-25 21:50:00 【华为云】
目录
EL表达式改进JSP
JSP的缺点
由于jsp页面内,既可以定义HTML标签,又可以定义java代码,造成了以下问题
1、书写麻烦:特别是复杂的页面
2、阅读麻烦
3、复杂度高:运行需要依赖各种环境,JRE。JSP容器(tomcat服务器).....
4、占用内存和磁盘:JSP会自动生成.java和.class文件占磁盘,运行.class文件占内存
5、调试困难:出错后,需要找到自动生成的.java文件进行调试
6、不利团队写作:前后端人员
...
JSP已经逐渐退出历史舞台,取而代之的是html和Ajax
演化过程:
最好不要直接在jsp里写java代码
EL表达式
Expression Language表达式语言,用于简化JSP页面内的java代码
主要功能:获取数据
语法:${expression}
如:${brands}:获取域中存储的key为brands的数据
idea中使用Maven时常见问题
idea中使用了maven无法创建包/类
没有源文件,将其中的一个文件添加为源文件,就可创建包或类了(项目结构中标蓝)
idea中配置web的maven项目
maven创建的web中无法创建servlet
maven中部署tomcat插件
pom.xml文件中写入
EL表达式的演练
创建一个com.web.ServletDemo1类
在web.app目录下创建el-demo.jsp,其中写入${lists}即可
运行结果
边栏推荐
- 少儿编程 电子学会图形化编程等级考试Scratch一级真题解析(判断题)2022年6月
- Configuration and use of multithreading
- MPI学习笔记(二):矩阵相乘的两种实现方法
- Dear bosses, how can I print the result of Flink SQL to the console and display it completely?
- [MAIXPY]kpu: load error:2005, ERR_ READ_ File: read file failed problem solving
- 919. 完全二叉树插入器 : 简单 BFS 运用题
- Basic knowledge in the project
- At present, flynk CDC does not support mysql5.5. If you change the source code and release this restriction, there will be a lot of data problems?
- 【面试:并发篇23:多线程:join】join再理解
- 动画曲线天天用,你能自己整一个吗?看完这篇你就会了!
猜你喜欢

Jmeter---设置代理录制请求
![[ManageEngine] value brought by Siem to enterprises](/img/1e/56d64d193e0428523418bef5e98866.png)
[ManageEngine] value brought by Siem to enterprises

GPON介绍及华为OLT网关注册配置流程

函数栈帧的创建和销毁

Job interviews are always a second kill? After reading the seckill system notes secretly stored by JD T8, I have given my knees

C#Socket

【leetcode天梯】链表 · 021 合并两个有序链表

五、品达通用权限系统__pd-tools-xxs(防跨站脚本攻击)

Oracle RAC RMAN backup error ora-19501 ora-15081

How will Web3 change the future of people?
随机推荐
Share | intelligent fire emergency management platform solution (PDF attached)
GPON介绍及华为OLT网关注册配置流程
Redis configuration
Blood spitting finishing nanny level series tutorial - playing Fiddler bag capturing tutorial (7) - Fiddler status panel -quickexec command line
C#Socket
【leetcode天梯】链表 · 876 查找链表中间结点
动画曲线天天用,你能自己整一个吗?看完这篇你就会了!
I/O案例实操
性能调试 -- Chrome Performance
Guys, how can Flink SQL submit tasks in per job mode?
[leetcode ladder] linked list · 021 merge two ordered linked lists
[JS] the problem pointed by this
Lichuang EDA -- creation of devices 01 resistance (II)
【leetcode天梯】链表 · 021 合并两个有序链表
Detailed explanation of several ideas for implementing timed tasks in PHP
Optimization analysis of storage structure and IO performance of openharmony littlefs file system
dovecot 设置邮箱quota
【面试:并发篇25:多线程:volatile】可见性
New maixhub deployment (v831 and k210)
Dear bosses, how can I print the result of Flink SQL to the console and display it completely?





