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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -