Hi all,
I am trying to access a bean thru' a servlet. I am getting error as
"Conversation.UserHome not found"
Here Conversation.UserHome is the lookup name for the bean. Here is my code.
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.rmi.*;
import java.rmi.server.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import ejbeans.*;
public class viewServlet extends HttpServlet
{
private Context context;
static
{
System.setSecurityManager(new RMISecurityManager());
}
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
final Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"allaire.ejipt.ContextFactory");
properties.setProperty(Context.PROVIDER_URL,
"ejipt://itl-pc-1703:2323");
try
{
context = new InitialContext(properties);
final UserHome home = (UserHome)
context.lookup("Conversation.UserHome");
final User user = home.create();
}
catch (Exception exception)
{
throw new RuntimeException(exception.getMessage());
}
req.getRequestDispatcher("form.jsp").forward(req,res);
}
}
Any help in these regards is welcome
Thanx.
Amit.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html