if you mean spring specify struts.objectFactory.spring.autowire in /resources/struts-plugin.xml e.g.
struts.objectFactory.spring.autoWire = type The autowire property can be set to several options. name Auto-wire by matching the name of the bean in Spring with the name of the property in your action. This is the default type Auto-wire by looking for a bean registered with Spring of the same type as the property in your action. This requires you to have only one bean of this type registered with Spring auto Spring will attempt to auto-detect the best method for auto-wiring your action constructor Spring will auto-wire the parameters of the bean's constructor http://cwiki.apache.org/S2PLUGINS/spring-plugin.html hth Martin ______________________________________________ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: jhki...@summa-tech.com > Date: Fri, 17 Apr 2009 09:39:57 -0400 > Subject: Re: Is there a way to make Struts2 working with other methods > different than classic getter/setter? > To: user@struts.apache.org > > You can do that right out of the box. I do it all the time. Give it a try. > Create method with those names, and reference them in JSPs by those names. > It should work. > jk > > On Fri, Apr 17, 2009 at 9:31 AM, Federica Oltolina < > federica.oltol...@ubiquity.it> wrote: > > > Hi all, > > my head office yesterday asked me if it's possible to declare > > in some special file a mapping between actions and their methods > > because he'd like to use custom getter/setter methods containing some > > little formatting operations. > > > > For example, for the action attribute: > > / > > private String bankingCode;/ > > > > he liked having in our action more than one getter that would sound like: > > > > /getBankingCodePrecedeedByAnyZero(); > > getBankingCodePrecedeedByFiveZero(); > > and so on... > > > > /and then in the jsp that corresponds to the action cited above ho would > > Struts2 to be able > > to understanding the correct setter/getter method, for example he'd like to > > write > > > > /... > > <s:property value="//bankingCodePrecedeedByAnyZero//"/> > > ...// > > / > > obtaining the result of the method /getBankingCodePrecedeedByAnyZero(); > > > > /Someone knows if there is a way to do this? > > No matter if this sounds like a swearword for a Struts2 good user > > or if this is not smart, he asked me this. > > > > Thanks in advance > > Federica > > > > > > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com _________________________________________________________________ Windows Live™: Life without walls. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1b_explore_042009