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%>">