How can I invoke the remote methods of an RMI object from a JSP page?

Jayesh Nazre

Well whether its JSP or an application the method to invoke the remote methods is the same :
1) First get the remote handle using JNDI (use Naming.lookup () to get the remote interface)
2) Once you have the remote interface you can invoke the remote methods.

Now you can define the code for getting the remote handle at page level i.e in "<% %>" tags. Or application level by overidding jspInit() or at session level. This depends on how you want to access the remote interface..

For a detail explanation refer the following URL : http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html#RMIClient

The above URL explains how to invoke a remote method in an application. You can use the same code for JSP for invoking the remote method by placing the code in "<% %>" tag.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.