Hi,
I am new to
EJB. I am using EJB 3. when I click button from
JSP then I want to get only one field value's arraylist from database.
for this I did EJB call. and from ejb method I call DAO class and I fetch value and store in arraylist. and that arraylist I want to print in JSP.
Now my question is, from DAO class whatever I get value, Do I need to transfer using Data transfer object, means in ejb side also create bean file and using this object I need to transfer that arraylist( means arraylist of that bean object).
or direct I can return arraylist of
string type to
servlet and to Jsp?
My program flow:
JSP --> servlet --> interface(ejbcall) --> class implement interface --> DAO-->
return arraylist of string --> interface --> servlet--> jsp of output.
Do I need below?
JSP --> servlet --> interface(ejbcall) --> class implement interface --> DAO-->
return arraylist of bean object --> interface --> servlet--> jsp of output.
Thanks in advance.