java - Display contents of XML (property mapping) in a JSP page -
i have property mapping (colormap.xml):
<bean id="b_colormapping" class="com.project.color.colormap"> <property name="map"> <map> <entry key="1" value="blue" /> <entry key="2" value="blue-green" /> <entry key-ref="10" value-ref="b_colormapping" /> </map> </property> </bean> <bean id="r_colormapping" class="com.project.color.colormap"> <property name="map"> <map> <entry key="1" value="red" /> <entry key="2" value="red-yellow" /> <entry key-ref="10" value-ref="r_colormapping" /> </map> </property> </bean>
and com.project.color.colormap
codes this:
public class colormap { private map<object, object> map; public map<object, object> getmap() { return map; } public void setmap(map<object, object> cmap) { map = cmap; } }
right now, happening, manually update colormap.xml adding entries , values. i'm planning create jsp page handle adding of values in xml.
for now, want display values of xml on jsp page.
for example: (on jsp page...)
b_colormapping: color key: 1 value: blue color key: 2 value: blue-green r_colormapping: color key:1 value: red color key:2 value: red-yellow
can offer or tip on how this? spring mvc (object, map, modelandview).
i'm stuck on one.
Comments
Post a Comment