IDEA introduces JSTL in WEB projects

0. Jar package download

https://download.csdn.net/download/u010312671/12523070

1. Create a Web project

Create a JAVA WEB project in IDEA. If this step is difficult, please refer to the IDEA I wrote to create a WEB project . I have introduced the specific steps in detail.

2. Introduce JSTL expression

2.1 Create a JAVA WEB project

Insert picture description here

2.2 Create lib directory under WEB-INFO

Insert picture description here

2.3 Copy the jar package in

Download the jar package that jstl depends on in advance
Insert picture description here
and copy and paste it to the lib directory.
Insert picture description here
Open the following panel through the shortcut key Ctrl+Shift+Alt+S:
Insert picture description here
as shown in the figure below, the jar is successfully imported into the project, just click OK.
Insert picture description here

3. Write Servlet test

Write a Servlet, create a list of data to store multiple strings.
Insert picture description here
Introduce the jstl expression in the list.jsp page, and iterate the information:
Insert picture description here
successful display:
Insert picture description here

Guess you like

Origin blog.csdn.net/u010312671/article/details/106737121