What are you trying to achieve? Maybe you're trying to put logic in your
JSPs that more properly belongs in an action.


thanks. what i am trying to do is to get the value of a field. Say I get a
list of items:

class item {
Set values;
...
}

The item has a set of Values:
class Value {
Attribute attribute;
String value;
}

What I wanted to do is to get one particular value based on attribute ID. in
this case I have to add a method in the Item class, someting like this:

String getValue (String id) {
 while (it.hasNext()) {
    Value value = (value) it.next();
    if (value.attribute.getId().toString().equals (id)
       return value.value;
 }

So from JSP, I would like to call this method <c:out value="${item.getValue
(id}"/>

Reply via email to