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

Categories

For example

<jsp:useBean id="total" class="java.util.LinkedHashMap"/>
// need somehow do something like this: total.put('key', 'value');

But without using scriptlets (it's obvious but a little bit ugly)

See Question&Answers more detail:os

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

1 Answer

You can use JSTL <c:set> for this.

<jsp:useBean id="total" class="java.util.LinkedHashMap"/>
<c:set target="${total}" property="key" value="value" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...