The best thing would be to encapsulate the conversion either in your
ActionForm class or your business class. 

The business class is usually the best place for the conversion method,
since this would allow it to be used in any environment that brought in
a String but needed it converted to a binary. 

The Action may coordinate the transfer between the classes, but the
actual code for the conversion should be in one class or the other, so
that it can be reused. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services



Vijay_Nikalje wrote:
> 
> Hello,
>   I have some problem with struts. I have a jsp, and action form and an
> action class. Now I understand that Once I submit a form, setter methods of
> action forms or form bean are called. I have some int type data, float type
> data, double type data, all these I get as string within an action form. I
> need to convert this string type data to it's respective data type. Which is
> the best place for conversion, action form or action class and why? Can
> value objects be used to convert data?
> 
> Please do replay.
> 
> thanks and regards,
> Vijay Nikalje
> Id : 6413
> VBU Insurance
> Satyam Computer Services Ltd.
> Tara Heights, Pune
> INDIA
> extn. 2815
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to