<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>forEach</title> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <c:forEach varStatus="i" begin="1" end="9"> ${i.index} </c:forEach> </body> </html>