struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Hill <>
Subject Re: logic tag
Date Mon, 13 Dec 2004 11:21:51 GMT
Sorry mate, you going to have to be a bit more specific about the 
problems your having, and precisely what result it is that you are 
actually trying to achieve, as we are having some trouble understanding 
the question!

I am having a vector object in jsp

In a request or session attribute I presume?

An ActionForm's two instances are stored in that vector

This I dont understand. The struts methodology involves one actionform 
per request, and its instantiated, populated and put into the request 
)or session) by the RequestProcessor. Are you doing some custom handling 
to support multiple actionforms per request or did you mean something else?

How can i produce the results

What is the result that you are trying to produce?

I guess you want to iterate a vector and output the contents?

At its simplest you should be able to do something like:

<logic:iterate name="myVector" id="myBean">
   <bean:write name="myBean" property="myProperty">

Change "myVector" to the attribute key that your vector is stored under 
in the request or session. "myProperty" refers to the name of the single 
variable you wish to output. It needs to have a single getMyProperty() 
method (change names as appropriate).


The article at:
has some advise on how to improve your communication when asking 
questions in lists like this, and is well worth a read if you are new to 
such forums.

Pramod wrote:

> I am having a vector object in jsp. An ActionForm's two instances are stored in that
vector. Action form contains only one variable. How can i produce the results using logic
& bean tags

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message