Tracking user activity in a window opened by window.open ()

I want to open an ftp browser on a client site so that it can upload files to ftp. I use the window.open() method to open ftp in a child window.

 var windowObjectReference = window.open("ftp://" + username + ":" + password + "@" + server, _blank', toolbar=yes, location=yes, status=yes, scrollbars=auto, copyhistory=no, menubar=yes, width= 500px, height=500px, left=300px), top=100px, resizable=yes' ); 

ftp looks like this:

[1]: http://i.stack.imgur.com/T6WYg.jpg

Now I want to track user activity, for example, directories that he visited, and send the path to the jsp page, how to do it ... ??

+7
java javascript jsp ftp
source share
1 answer

For security reasons, browser windows with different domains cannot see each other ( same origin policy ). In addition, ftp does not support any kind of JavaScript that allows you to track what the user is doing.

This leaves you with two options:

  • Examine the FTP server log files to see what the user has done.
  • Instead of directly redirecting to ftp:// write a JSP that gives access to files on the FTP server. This way you can keep track of everything the user does.

For solution # 2, the files must be on the web server or you need to use the Java library, which can talk to the FTP server.

Note. The FTP client in the browser is probably implemented using HTML and JavaScript, but all this code is hidden somewhere in the browser. Therefore, even if the display has HTML and JavaScript, you cannot access it.

+1
source share

All Articles