I'm having a strange issue with JSP.
out.println(challenge.name);
${challenge.name}
<p>Challenge '${fn:escapeXml(challenge.name)}'.</p>
Strangely only the first line works, the other ones don't return anything. Why is this the case?
here is a more complete part of the code as requested via the comments:
<%
Challenge challenge = ObjectifyService.ofy()
.load()
.type(Challenge.class)
.id(challengeId)
.now();
if (challenge == null) {
%>
<p>Challenge with id '${fn:escapeXml(challengeId)}' could not be found.</p>
<%
} else {
%>
<p>Challenge <% out.println(challenge.name); %></p>
<p>by <% out.println(challenge.author_name); %></p>
<%
}
%>
Originally the test took place where I'm now printing with println.