• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Servlets and RMI

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
Can a Servlet access a method remotely, using RMI (and use the returned data in its output)?
Thanks.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ralph !!
Varun.
 
reply
    Bookmark Topic Watch Topic
  • New Topic