当前位置:网站首页>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}即可
运行结果
边栏推荐
- Redis usage details
- Oracle RAC RMAN backup error ora-19501 ora-15081
- How to implement distributed locks with redis?
- How to evaluate hardware resources (number of CPUs, memory size) when Oracle migrates from small computers to x86 architecture? Is there a measurement index or company?
- What are the application characteristics of NTU general database gbase Bi?
- golang : MVC之models
- Creation and destruction of function stack frames
- Six principles of C program design
- The noise reduction effect is increased by more than 6 times! With the microphone inside the headset, this wireless noise reduction headset is unusual!
- 工作面试总遇秒杀? 看了京东 T8 大咖私藏的秒杀系统笔记, 已献出膝盖
猜你喜欢

C#Socket

ansible+Crontab批部署巡检

NVIDIA has opened source a comprehensive library of 3D deep learning based on pytorch

零基础学习CANoe Panel(17)—— Panel CAPL Function

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

少儿编程 电子学会图形化编程等级考试Scratch一级真题解析(判断题)2022年6月

GPON introduction and Huawei OLT gateway registration and configuration process

【leetcode天梯】链表 · 876 查找链表中间结点

Detailed explanation of Ag search tool parameters

Redis usage details
随机推荐
Ijcai2022 meeting! Microsoft and other tutorials on domain generalization
c sqlite ... ...
文件无法保存(文件夹已损坏无法读取怎么办)
工作面试总遇秒杀? 看了京东 T8 大咖私藏的秒杀系统笔记, 已献出膝盖
信息安全建设原则指导
Six principles of C program design
新版Maixhub部署(V831与K210)
MySQL master-slave configuration
How to configure and use rocksdb in the flinksql environment
选择的能力
ag 搜索工具参数详解
Blood spitting finishing nanny level series tutorial - playing Fiddler bag capturing tutorial (7) - Fiddler status panel -quickexec command line
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
Ability to choose
【leetcode天梯】链表 · 021 合并两个有序链表
[51Nod1676 无向图同构]无向图哈希[通俗易懂]
函数栈帧的创建和销毁
立创EDA——器件的创建01-电阻(二)
Bitcoin.com:usdd represents a truly decentralized stable currency
Stm3 (cubeide) lighting experiment





