I'm trying to use JNDI in tomcat but it doesn't work!!!

I deployed this code with the deploytool and run ok in J2EE server in
localhost:

InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("usermanager");
UserManagerHome homeuser =
(UserManagerHome)PortableRemoteObject.narrow(objref, UserManagerHome.class);
UserManager UsrMgr = homeuser.create();

Now, I'm trying to make the deploy with ant application and run it in Tomcat
Server (remote host). And I get the following error:

javax.servlet.ServletException: Name usermanager is not bound in this
Context
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
at
org.apache.jsp._0002fuserfunc_jsp._jspService(_0002fuserfunc_jsp.java:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl.....
.
.
.

I don't know where must I bound the usermanager Bean. Any XML file example
???

Regards
Papo

Reply via email to