Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write query

 
S Bhanu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
S Bhanu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possible ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic