hi, i am a beginner to servlets. i was informed that jdbc and applets could be used with servlets. i would like to know whether rmi could be used with servlets. if so how?
RMI runs over JRMP or IIOP. Servlets are server side java modules that extend the functionality of a server. Servlets out there are mostly HTTPServlets and they extend the functionality of the Web server. Because they run on HTTP, can't be used. I would guess that then GenericServlet can be used because it is protocol-independent. I haven't had a chance to see one example that has used it though. Please anybody correct me if I am wrong! Vladan
But an HttpServlet is a GenericServlet So anything that a GenericServlet can do, and HttpServlet can also do. But most importantly, Servlets have access to the whole Java API including RMI. They use HTTP to communicate back to the client (a browser?) But nothing prevents them from using any other protocol to communicate. They could open sockets to other servers if needed, e.g.
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD
Yes, Servlet can work with RMI. I have created a servlet front end that invokes a remote object on another host to perform a socket connectivity test and returns the test result back to the servlet. It works perfectly. This reply may be a little too late. I am new to this site and found the info here is very helpful. Just try to make some contribution.
Servlets can do anything a Java application can do - I have a RMI example in the servlets book. Basically the only things you have to watch out for are catching exceptions and synchronizing access. Bill ------------------ author of: