user0912
user0912

Reputation: 13

What is JSP 2 version of <c:set>?

How can I set a value using JSP 2?

I mean, if ${val} is the new version of <c:out value="${val}" />, what is the JSP 2 version of <c:set var="val" value="bla" />?

Upvotes: 0

Views: 1284

Answers (1)

Matt Ball
Matt Ball

Reputation: 359876

I think you're confused. ${val} is not the new version of <c:out value="${val}" />. Both are Expression Language (EL) statements.*

In JSP 2, you still use <c:set var="val" value="bla" />.

http://en.wikipedia.org/wiki/JavaServer_Pages#JSP_2.0

*okay, okay, so while ${val} is an EL statement, <c:out value="${val}" /> is a JSTL tag that uses an EL expression.


The JSP 2 section of the Wikipedia article has parts copied verbatim from here.

Upvotes: 3

Related Questions