struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meeboo <>
Subject Re: Running a prepare method before the assigned action method
Date Sat, 22 Mar 2008 15:09:59 GMT

It seems as if the preparable method can't parse parameters if they are in
the following format

update/modelObject/10.action (where 10.action is the primary key)

where as it works fine when using action urls like this

Is this expected behavior? 

meeboo wrote:
> Hi all
> I have a class for several actions and each action is mapped to a method,
> like this:
> <action name="update/modelObject" 
>            class="net.myapp.web.modelObjectActions"
>            method="update">
> <result>/index.jsp</result>
> </action>
> The above action will fire when a form is submitted and the modelObject
> properties are populated via the form fields. Now that I want is to invoke
> a prepare method before the update method so that I first can read the
> model object from the database and then populate its fields. I did
> implement preparable in modelObjectActions but then the prepare method
> will be invoked before all actions in that class, I want it to be invoked
> just for this specific action. 
> Any ideas?
> Thanks

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message