Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は次のものを持っています:
<html:select property="myMap(abc)">
ただし、実際に行う必要があるabcのは、Javaクラスの静的メンバーから文字列をプルすることです。
abc
私は次のようなことを考えました
<html:select property="myMap(<%=MyClass.FIELD%>)"> 、しかしそれはうまくいきませんでした。
<html:select property="myMap(<%=MyClass.FIELD%>)">
ここでの正しい構文は何ですか?
次のことを試してください。
<% String name = "myMap(" + MyClass.FIELD + ")"; %> <html:select property="<%=name%>">