This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlets and RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and RMI" Watch "Servlets and RMI" New topic
Author

Servlets and RMI

Varun Rupela
Greenhorn

Joined: Feb 17, 2002
Posts: 12
Hi:
Can a Servlet access a method remotely, using RMI (and use the returned data in its output)?
Thanks.


Varun Rupela<br />Graduate Research Assistant<br />Department of Computer Science and Software Engineering.<br />Auburn University.
ralph roper
Greenhorn

Joined: Nov 25, 2001
Posts: 25
Yes. In summary this is how you do it.
Create your RMI server class, implementation class and interface class and then compile with javac and rmic. rmic will create the skeleton and stub classes. Copy the skeleton, stub and interface classes to the client. Start the rmiregistry process and then run your server class.
On the client your servlet will need to bind to the registry service running on the server. Once this is done you can call the remote methods in your servlet.
Sun has a good rmi tutorial if you need more detail.
regards,
Ralph
Varun Rupela
Greenhorn

Joined: Feb 17, 2002
Posts: 12
Thanks Ralph !!
Varun.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets and RMI
 
Similar Threads
RMI required?
Ejb Protocol
RMI
This Weeks Giveaway
how many ways do two java program communicate?