wood burning stoves 2.0*
The moose likes JSP and the fly likes converting a form bean to value object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "converting a form bean to value object" Watch "converting a form bean to value object" New topic
Author

converting a form bean to value object

Rashmi Reddy
Greenhorn

Joined: Oct 16, 2003
Posts: 19
Hi,
please tell me how do we convert a java form bean to a value object.
Also the code details.
Thanks,
Rashmi
Rashmi Reddy
Greenhorn

Joined: Oct 16, 2003
Posts: 19
To elaborate on my question, i have a html form bean, i want to seperate the business login in the ejb. To call a ejb method I need to send a value object that has all the fields of the html form.
Please give me the code example.
Thanks & Regards,
Rashmi.
Suresh Babu Akula
Greenhorn

Joined: Oct 27, 2003
Posts: 6
Hi Rashmi Reddy ....
How r u..
to your problem what you do is....
From Html send all the details to Jsp/servlet Page there using getParameterNames() method retrive all the names with these name you can retive the values. So now put all these names and values in a HashMap.
Now send these HashMap to Bean or EJB.
I think you know how to retrive the values form HashMap.

I think this solutions will solve to your problem

Suresh
Rashmi Reddy
Greenhorn

Joined: Oct 16, 2003
Posts: 19
Hi,
Thanks, that might work..
Rashmi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting a form bean to value object