File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Accessing RMI Application through an Applet hosted on Apache web server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Accessing RMI Application through an Applet hosted on Apache web server " Watch "Accessing RMI Application through an Applet hosted on Apache web server " New topic
Author

Accessing RMI Application through an Applet hosted on Apache web server

Peter Matthews
Greenhorn

Joined: Nov 07, 2005
Posts: 21
Hi All,

First of all, thanks to Edward Chen for answering my query on javax/mail/MessagingException. Finally have that sorted, however it has led me to another problem...

Ok, heres the story...I have an applet which is deployed on Apache Webserver (localhost), with the neccessary files needed for the RMI app in the same directory - htdocs(i.e. Applet class, RMI Interface, and Stub). I have the object server running on the same machine - which is in the directory C:/pumps. For the binding I'm using rmi://localhost/PumpService. I'm running the rmiregistry in the C directory. The problem is that when I access the applet through localhost(i.e. http://localhost/pumps.htm) it doesnt work, doesnt seem to access the remote object. However, if I directly load the html page from C:/Apache2/htdocs/pumps.htm - it works perfectly. Any ideas on the way I could get it working through the localhost?

Thanks...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

It would help for you to find out the exception you are getting that is causing the applet not to work when accessed through "localhost"... depending on what browser you are using, and whether you are using Sun's Java Plugin to run applets, the Java console for applets can be accessed in different ways. If you're using a recent version of the Java plugin, look for a java icon in the area of the taskbar that shows always-running programs. Click it and look for something like "Java console". In Internet Explorer, there should be a menu under the "Tools" menu called "Sun Java Console", though you may have to turn this option on in the "Internet Options" menu if it isn't available.

Once you find out how to bring the console up, when your applet doesn't work, bring up the console to see if there are any exceptions displayed. Finding out what specific exception is causing your applet not to work will help the most in figuring out how to fix it.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Accessing RMI Application through an Applet hosted on Apache web server