Link to home
Start Free TrialLog in
Avatar of sangeetha
sangeetha

asked on

Creating a Class in EJB and using it in my Struts Forms.

Hi,

Please look here:

http://jaggybala.clawz.com/CalendarTool/ShowList.html

At present i have 3 JSP's, 2 Form-Bean and 2 Form-Action as follows:

     JSP                       Form-Bean               Form-Action
  ------------              -----------------         -------------------
  FilterList.jsp           FilterForm.java           FilterAction.java
 RegisterList.jsp       RegiterForm.java        RegisterAction.java
 ShowList.jsp                   ---                             ---

ShowList.jsp includes FilterList.jsp and RegisterList.jsp

At the bottom, you can see a list of members.

Q is : *I want to populate a colleciton of members with dummy objects and return it from inside the EJB.*

I was adviced by girinois as:
--------------------------------
Just create the EJB (obtain the home interface) and then call the remote method on the EJB. In one of the remote methods pass an array or a vector of the dummy objects you have. Then do the processing you want in the EJB.

I am a new-bie for EJB and Struts... Could anyone give me some code hints...

Thanks for reading.
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> I want to populate a colleciton of members with dummy objects and return it from inside the EJB

I would assume that you want to create the list of members inside the EJB. You just need to code it like any normal method which returns a Collection (if you wanna use Collections). Do you want help with writing code to obtain the home interface, etc?

Which server are you using?

Make sure that anything which is passed to the EJB or returned from it is serialized.
Avatar of sangeetha
sangeetha

ASKER

thanks for your replies. sorry for being late.
The article was good, but i find it bit difficult to copw up with home interface, remote interface, etc...

Could you please explain me how and when to use home interface/remote interface. I am using JBoss server.

all the tutorials are too advanced for my java knowledge.

thanks again.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok...thanks.