In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces what are the knowledge points of Servlet and Jsp, the content is very detailed, interested friends can refer to, hope to be helpful to you.
EL expression
Function: for more convenient communication between Servlet and Jsp
It turns out that this is how the data is obtained:
Now the EL expression looks like this:
${str} ${user.addr.town} ${map.a}
One by one, it's really convenient to drink too much.
Pre-use preparation of JSTL:Jsp standard tag library
Function: it is too annoying to write java code in jsp. It is much more convenient to write this java code in jstl.
Guide packages jstl.jar and standard.jar are required before use
Tag library needs to be introduced in jsp files.
Out tags, set tags and remove tags
The function of the out tag is to output
The purpose of the set tag is to store key-value pairs
The function of the remove tag is to delete the key-value pair
The out tag is used as follows:
The set tag is used as follows:
The use of the remove tag is as follows:
If tags and choose tags
The function of if tag is the function of if in java.
The function of choose tag is the function of if ·else in java.
The if tag is used as follows:
This is the if judgment in jstl.
The choose tag is used as follows:
This is the choose tag of jstl.
He he
Foreach tag
It's just a cycle.
There are two uses: constant loop and dynamic loop. For example, you can see what's going on.
Constant loop usage: starting point is 1, end point is 5, step size is 1
This is the cycle of jstl-- ${vs.index}
Dynamic loop usage (important): very similar to the way for loops traverse the list in java
${str}
What are the knowledge points about Servlet and Jsp? so much for sharing here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.