I need to display variables that were initialized in a JSP page.
I have already tried to use ${value} and I also already tried everything in that was suggested in this thread: Values not displayed in jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
````<head>
````````<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
````````<title>JSP Page</title>
````</head>
````<body>
````````<h1>Hello World!</h1>
````````<ul>
````````````<% for(int i=0;i<10;i++){ %>
````````````<li>${i}</li> <!--I want to display i-->
````````````<% } %>
````````</ul>
````</body>
</html>
I expect the page:
<h1>Hello World!</h1>
<ul>
<li>0</li>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
</ul>
I get the page:
<h1>Hello World!</h1>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>