Commit 485bee9e by Patryk Czarnik

Obsługa JSTL

parent aa9c6822
...@@ -62,7 +62,21 @@ ...@@ -62,7 +62,21 @@
<artifactId>tomcat-embed-jasper</artifactId> <artifactId>tomcat-embed-jasper</artifactId>
<!-- numer wersji będzie automatycznie nadany przez Spring Boot --> <!-- numer wersji będzie automatycznie nadany przez Spring Boot -->
</dependency> </dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
</dependency>
<!-- https://jakarta.ee/specifications/tags/3.0/jakarta-tags-spec-3.0.html -->
<!-- Dla Spring Boot 2.x to była właściwa zależnośc dla JSTL:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
-->
</dependencies> </dependencies>
<build> <build>
...@@ -71,6 +85,7 @@ ...@@ -71,6 +85,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
......
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="jakarta.tags.core"%>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
...@@ -12,6 +13,11 @@ ...@@ -12,6 +13,11 @@
<div>${dt.hour}:${dt.minute}:${dt.second}</div> <div>${dt.hour}:${dt.minute}:${dt.second}</div>
<p>Test obliczeń: ${2 * 3 + 4}</p> <p>Test obliczeń: ${2 * 3 + 4}</p>
<c:if test="${2+2 == 4}">
<p>Prawda</p>
</c:if>
<c:if test="${2+2 == 5}">
<p>NiePrawda</p>
</c:if>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment