Hi,
I have just run the example RMI program in the java tutorial in my linux pc. Also I have another method to just echo a string back. It works fine when calling from command line.
Now I want to write a servlet that get a string when POSTed and call the RMI objects echo method and display the returned string.
I use Tomcat-5.0 which is installed in /usr/local. I moved the remote object interface jar to the common/lib folder and import the interface in my Servlet. I use the following statements inside the servlet to get the RMI object reference.
Registry registry = LocateRegistry.getRegistry("localhost");
Rser comp = (Rser) registry.lookup("rmiser");
When i use this in my servlet the tomcat stops working.
Also I don't know how to specify the code base and security policy which I use in command prompt when calling RMI object.
Pls suggest me what to do and also specify any resources that explain this task step by step.
Thanks.