struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harish Panwar <>
Subject Mapped Properties in Struts 2
Date Tue, 02 Sep 2014 07:41:27 GMT
Hi All,

We are migrating our website from Struts 1 to Struts 2. Everything is
working fine except the mapped properties.

Lets say we have text-field in our jsp:

<s:textfield name="arp(0)" />

Getter-Setter for this field were like this in struts1:

public String getArp(String key) {
    int index=Integer.parseInt(key);
    return prlist[index].arp;}public void setArp(String key, Object value) {
    System.out.println("set ARP: index:"+index+", value"+value);
    int index=Integer.parseInt(key);

But now this is not working in struts2. On form submit method setArp() is
not executing.

For detailed description, please go to:

If you want to see what are mapped properties:

I am stuck at this point. I tried to google it but could not get any
satisfactory answer. People are suggesting to use  <s:textfield
name="prist[0].arp" /> , but because of dependent code and other reasons I
can not use it.

My question is whether Struts 2 supports Mapped properties or not. If yes,
then how can I use it.

Harish Panwar

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message