struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ing. Andrea Vettori" <>
Subject Struts2 question on action with properties
Date Wed, 08 Nov 2006 07:56:52 GMT

I've used struts1 a lot and now I'm using struts2 version 2.0.1 for a  
new medium-sized project (it's an e-commerce site).

I'm facing this problem and since the documentation is poor (or at  
least it seems poor, maybe I'm looking on the wrong places), I need  
an advice from you experts.

In the home page, that is a jsp page loaded with the "Home" action, I  
have a couple of forms. In one of them I need to use a select tag to  
give the user some options. I've put the List getInfos() method on  
the Action specified on the form that contains the select tag since I  
thought that an Action would be instanciated and used to call the  
method. This gives me an error saying that the list param of the  
select tag is not found as a collection/array/..... etc.

Putting the getInfos() method on the Home action, that is the action  
that call the jsp page where the form is, works.

Now I think it would be "cleaner" if the getInfos() method belonged  
to the Action that is associated to the form. Is this possible to  
do ? Am I missing something ?

Thank you

Hope you understand my Italian-English :)

Ing. Andrea Vettori
Consulente per l'Information Technology

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message