Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
238 views
in Technique[技术] by (71.8m points)

java - set boolean value into variable using JSTL tags?

I am using JSTL tags. i have below code.

<c:set var="refreshSent" value="false"/>

Now variable refreshSent has boolean value or String?

Thanks!

question from:https://stackoverflow.com/questions/12512547/set-boolean-value-into-variable-using-jstl-tags

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It is going to be a boolean. You can check it by comparing in a

<c:if test="${refreshSent eq false}">

and

<c:if test="${refreshSent eq 'false'}">

The second is a string comparison.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...