I have the following code in the form bean:
private
String name = "";
public String getName(String nam) {
if(nam.equals("abc") {
//do something that cannot be done in
JSP return "noname"; //conditional return
}
}
public void setName(String str) {
name = str;
}
and I need to access the name from jsp using bean:write. I am using:
<bean:write name="bean" property="name" />
How can I pass parameter to the bean to check for the condition?
I need to implement this in jsp ONLY.
Thanks,
Bhanu