Results 1 to 4 of 4
  1. #1
    vissu007 is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    0

    Default How to get the URL of a web page through a Java application?

    I've opened a web page through my browser.Is there any possibility to get the URL of that page through a Java application?Reply soon.Thanq
    Last edited by vissu007; 06-28-2007 at 08:23 AM.

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Do you rreally mean url or html source code of that web page?

    If you mean url then you have two options. You can capture screenshot of the desktop from Java. You can do that and if your web browser is opened, you can extract the url from thie image with image processing. Obviously a difficult way. :)

    Another way can be to use windows APIs to obtain the url of opened web pages. I guess Windows should have such API calls. But to be able to use those calls, you will need to develop Java wrappers for those methods. You might search for APIs for that since someone might have already developed a wrapper.

    Good luck.

  3. #3
    vissu007 is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    0

    Default

    Thnx for replying soon.But can u give me the source code of this method if available.Thanq

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    I don't know windows APIs much. That is why i said "I guess". You will need to search for it.

Similar Threads

  1. How to display Tabuler Data in J2EE application on jsp page
    By AMATYA-CHANAKYA in forum Advanced Java
    Replies: 2
    Last Post: 04-23-2008, 05:54 PM
  2. Dynamically loading the jsp page to the application
    By shekar in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-09-2008, 03:28 PM
  3. How to read a Web Page through java program
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-04-2008, 02:37 PM
  4. How Do I Embed Java Correctly To A Web Page
    By abcd in forum Java Applets
    Replies: 7
    Last Post: 01-28-2008, 07:53 AM
  5. redirect page within a java applet
    By paul in forum Java Applets
    Replies: 1
    Last Post: 08-07-2007, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •