Doing it all in a JSP:
Outputs "xyzzy". If you're trying to use a scripting variable with JSTL, it
won't work (unless you're using the RT versions of the tags). The EL versions of
the tags only deal with scoped attributes. So, it would work if you did:
request.setAttribute("indexStr", "bar"
How do you write an index variable in an expression, where the index is
also variable.
i.e.
Given:
HashMap foo = new HashMap();
foo.put("bar", "xyzzy");
foo.put("baz", "plugh");
String indexStr = "bar";
this doesn't seem to work.
I think it is doing foo.get("indexStr") instead of foo.get("bar")
2 matches
Mail list logo