I am trying to access an ejb (stateful
session) from a jsp using:
Context initialContext = new InitialContext();
CartHome cartHome = (CartHome)javax.rmi.PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/cart"),CartHome.class); where the bean is cart.CartBean
the home interface is cart.CartHome
the remote interface is cart.Cart
(cart is the package)
but I keep getting the error
error: File
D:\orion\applications\cart\cart-web\WEB-INF\classes\CartHome.class does not
contain type CartHome as expected, but type cart.CartHome. Please remove the
file, or make sure it appears in the correct subdirectory of the class
path.
Now, I have tried putting the *.java files in classes\cart
directory, but this does not work. Does anyone have any ideas as to how to
fix this problem so I can access the bean? <jsp:useBean../>
does not work. Are there other simple ways which I can use to access this
bean?
|
- ejb question Vlad Petric
- Re: ejb question Derek Akers
- Re: ejb question Matt Brunner
- Re: ejb question Cathleen Dull
- Re: ejb question Cathleen Dull
- RE: ejb question Rick Bos
- RE: EJB question Reddy Krishnan
- Re: EJB question Al Fogleson