I have an object like this
public class Employee {
public String getName() {
return "tommaso";
}
public String getName(String name) {
return "tommaso "+name;
}
}
In my action (I use Struts) I set a parameter of object Employee.
request.setAttribute("emp",employeeInstance);
After that in jsp I write this code
${emp.name}
and the output is
tommaso
If I want to use the second method, public String getName(String name) { ... }
, using same formal text, ${emp. ...something passing a parameter... }
, is possible?
setParameter()
onrequest
. Please be careful that you don't introduce red herrings in your question. – Selfrealization