Sowmya - thanks for the reply.
This will work but doesn't answer the question why can't I change the object reference of counter?
Sometimes I made need to change the object reference - if I wanted to say receive a counter from a vector of counters (list) which had been set by a
servlet (setAttribute("list",list) - how I could I access this with getProperty.
I am getting the same problem having changed the object reference.
In this case...
<%@ page import="CounterBean" %>
<jsp:useBean id="counter" class="CounterBean" / >
<%
Vector v = (Vector)request.getAttribute("list");
Iterator i = v.iterator();
while (i.hasNext()){
counter = (CounterBean)i.next();
counter.setCount(44);
<h3>
the count should be 44 but is?
<jsp:getProperty name="counter" property="count" />
</h3>
<% } %>