How to call ejb-session bean with jsp
591068Aug 1 2007 — edited Aug 2 2007I had wrote a very simple session bean named HelloWorld fellow the Demo.It can be accessed by java client successfully. I want to access the session bean from a jsp file, but it's give a error said "cann't find the name",please the professor give me a way to solve the problem. My jsp file is like this:
InitialContext ctx;
ctx=new InitialContext(p);
HelloWorldSession helloWorld=(HelloWorldSession)ctx.lookup("HelloWorldSessionBean/remote");
out.println(helloWorld.sayHello("World"));
The jsp test file and the session bean are in the same project.
TKS for you help.