0

Простая страница

<%@page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <body>
        <c:set var="test" value="TestVariable"/>
        <c:out value="${test}">Fail</c:out>
    </body>
</html>

На выходе получается

<html>
    <body>
        
        ${test}
    </body>
</html>

Что я делаю не так? почему выводится ${test}, а не TestVariable?

1 ответ 1

0

В web.xml вместо написал <web-app>

<web-app version="3.1"
         xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         metadata-complete="false">

все заработало

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.