0

I have a problem with struts property, pl check my sample code.

in struts action class i have a property that is name2,

SampleAction.java

public class SampleAction extends ActionSupport
{
private String name2;// setter and getter is also there

}

if i use like below i ll get the value

<s:property value="name2"/>

I wan to get the name2 value in jsp in dynamic way,

but here i need pass the value 2 in dynamic way some thing like below..

<s:set name="nameNumber" value="2" />
<s:property value="name%{#nameNumber}"/>

How can i achieve that.

Thanks in Advance, Prabhakar Manthena

Prabhakar Manthena
  • 2,223
  • 3
  • 16
  • 30

0 Answers0