I am trying to write a web application which needs to accesses remote machine�s directories & get the files to present that to user. I am assuming that using web application can not access directory structure of remote machine, so, I am thinking RMI base application for remote communication.
Machine 1 (will have web application which user will access through given URL) Machine 2 (will have files, which is needed by web application to present to user)
so Machine 1 will have web application & Java files (RMI stub application) Machine 2 will have RMI Skeleton application.
Please let me know if there is better option for this.
Joined: Oct 30, 2001
Well, you could do it that way. But once you've added the requirement to install some Java code on every client machine (to run the RMI server), wouldn't you be better off with a Java Swing GUI than a Web one?
Web technology is considerably less rich in many areas than Swing. Also, with a Web technology, you have to support lots of different Web browser clients, which all (particularly the MS ones) abuse the "standards" to which they're supposed to conform, making your life hell. With a Swing GUI, there's just one platform: Java.
Believe me, I know, having been forced to do a Web front end to an application that would have been much better with a Swing one.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
Joined: May 18, 2006
that's true that swing is better option the way you understood the case but in this case I need to access only single machine (which contains the files) for directory structure and not all client machines.
And second constraint is that I need to plug-in new web application with existing web application (sorry didn't mentioned earlier).
Joined: Oct 30, 2001
Oh, right, the remote machine containing the directories you need to access is not the machine running the Web browser, nor the machine running the Web server, but some other machine.
If it's a machine fully under your control, can't you access its directories via some special path? For example, NFS on Unix-like systems, or \\server\drive\... on Windows.
If you can't do that, then your idea of putting a little RMI server on the remote machine isn't bad. In fact, our distributed system has something very similar to that, although we use CORBA not RMI (but we have mixed Java/C++).