aspose file tools*
The moose likes Beginning Java and the fly likes Want to obtain the url being displayed in the currently active browser window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Want to obtain the url being displayed in the currently active browser window" Watch "Want to obtain the url being displayed in the currently active browser window" New topic
Author

Want to obtain the url being displayed in the currently active browser window

Kashyap Pancholi
Greenhorn

Joined: Jan 03, 2008
Posts: 9
Consider there are 5 IE windows open. Each is displaying a website. One of the 5 screens is in focus. How can i obtain the url displayed in this window.

1. The details of the websites can be found in :
C:\Documents and Settings\<user>\Local Settings\Temporary Internet Files
2. Listing the html documents among these files would give me the list of url's accessed.

Is there any property or value that will tell me the currently active url?

Is there any other way to achieve this?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Where do you imagine this code running -- on the desktop? In an applet? On the server? Is the applet signed? Java code, or JavaScript, or something else? Is this in a controlled intranet environment (all Windows, all IE, etc) or on the Internet?


[Jess in Action][AskingGoodQuestions]
Kashyap Pancholi
Greenhorn

Joined: Jan 03, 2008
Posts: 9
This is a stand alone application that would run on the desktop - it would work with IE.
Kashyap Pancholi
Greenhorn

Joined: Jan 03, 2008
Posts: 9
Since I am asking for help on this, its only fair that I give you a clear picture.

This is a standalone application to be run with IE - the browser I normally use. When i am viewing a webpage and find that i want to save a part of the text, i should be able to click on a button in the browser toolbar - which launches the java application - and the highlighted text in the webpage along with the url is written to a target text file.

1. How do i capture the url?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to obtain the url being displayed in the currently active browser window
 
Similar Threads
Can't Save In Ecplise
reading a private method within a class
My app inactive obtain the focus of windows system how?
Compiling a hibernate app
error while trying to configure build path