This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get URL information

 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a standalone java application that is not running inside a browser. Is there a way to get the current URL displayed inside the address field
of Internet Explorer?
Thanks.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you would have to get your application to find out of IE is even RUNNING . . . Suddenly this gets very OS dependant.
 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's assume that IE si the browser that will be used. Is there a way to get this information?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seriously doubt if you are going to get this done using Java. What you need to do is go to the Windows OS (I am making the assumption that you meant this OS) and find out what processes are running. Then you have to find out which of those processes is handling IE (note that there may be more than one running at a time). Then you need to find out what page it is looking at.
Essentially this is what the TaskManager in Windows does, so you would need to find the MicroSoft dll that does this and use some JNI to integrate those functions into your java app.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was reading this other thread on Proxy Servers, and they were talking about: if you know the port that the browser will connect to you can listen for connections and parse the HTTP Headers etc.
Proxy Servers
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic