This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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
This Weeks Giveaway
Ejb Protocol
RMI required?
RMI
how many ways do two java program communicate?