Question

I have the following:

<html:select property="myMap(abc)">

What I really need to do, however, is pull the string abc from a static member of a java class.

I thought something like

<html:select property="myMap(<%=MyClass.FIELD%>)"> , but that didn't work.

What's the correct syntax here?

Was it helpful?

Solution

Try the following:

<% String name = "myMap(" + MyClass.FIELD + ")"; %>
<html:select property="<%=name%>">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top