1

I have problem with JSTL taglib variable printing.

My JSP file:

<%@taglib prefix="c" uri="/WEB-INF/c.tld"%>
<%@taglib prefix="fn" uri="/WEB-INF/fn.tld" %>
....
<%
    String val1 = "";
    Object val = RequestUtils.lookup(pageContext, "Form", Names.Val.full(), null);
    if (val != null) {
      val1= ResponseUtils.filter(val.toString());
    }
System.out.println(val1); // (correct)
%>

<c:out value="${val1}" />
<c:out value="<%=val1 %>" />
<c:set var="some" value="<%=val1 %>" />
<c:out value="${some}" />
...

Output:

  • ${val1} (incorrect)
  • Test (correct)
  • ${some} (incorrect)

What is wrong? Please help!

Wojciech Szymski
  • 365
  • 4
  • 16

1 Answers1

2

I found solution:

<%@page isELIgnored="false"%>
Wojciech Szymski
  • 365
  • 4
  • 16