struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Gupta <>
Subject Re: Only one Object gets initialized in action class?
Date Sun, 03 Mar 2013 02:10:04 GMT
Hi Lukasz,

First of all i would like to know, if i have below code ,how it is supposed
to work

Here is my action class i.e which has 3 type of
instance variable i.e

private CustomerData customerData=null
private CustomerAddress  customerAddress=null;
private ShoppingDetail shoppingDetail=null;

// getters and setters of above variable

Now i have below code snippet in JSP

<s:url namespace="/customer" action="displayCustomer"
method="displayCustomer"  >
    <s:param name="customerData.custName" value="Scott"></s:param>
    <s:param name="customerAddress.street1" value="Escort Avenue"></s:param>
    <s:param name="shoppingDetail.item" value="Laptop"></s:param>

Am i supposed to get all 3 instance variable initialized(i.e customerData,
customerAddress,shoppingDetail) in action class with
the values passed in s:param tag ? This is the main point question here.

What i am experiencing is only one object gets initialized which is first
in order as s:param under s:url. In this case customerData.
Similary if i put   <s:param name="shoppingDetail.item"
value="Laptop"></s:param> as first parameter under s:url tag then only
shoppingDetail gets initialized while rest two are not initialized?

On Sat, Mar 2, 2013 at 8:37 PM, Lukasz Lenart <>wrote:

> I have tested with the latest version and everything is ok.
> Did you try that way <s:param name="customerAddress.street1"
> value="Escort Avenue"/> ?
> Regards
> --
> Ɓukasz
> + 48 606 323 122
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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