• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

How to find the title of current web page open in webEngine

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually, i need to find the location in my application before page loading and after page loading, I know it's a typical question  : rolling: but I need to know the exact link for extracting the content of.ini file which will save in the temp.    
 
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused. What do you mean by "the location in my application" and what is "the exact link for extracting the content of.ini file"? A file does not usually have a link associated with it.
 
Niti Kapoor
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mainly want to find the title of current web page open in webEngine(JavaFX)
 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I have adjusted the subject of this topic accordingly, and have moved it to the JavaFX forum; hopefully someone here knows it.

From a quick glance at the javadocs it looks as if the WebEngine class has a method to return the URL.
 
Niti Kapoor
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a ton Tim for sending Java forums I hope to get the answer fast
 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you consult the javadocs, you should indeed find the answer very quickly.
 
Niti Kapoor
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had check that and I find the method getTitle() but It's not printing in the output screen
 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That certainly seems the correct method. While I don't really understand what "It's not printing in the output screen" means, tell us what happens when you print the method's return value to the standard output.
 
Niti Kapoor
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean to say that the title is not fetching and it doesn't return while I run the project.
 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be more elaborate in your answers. What does "it doesn't return" mean - the method call just hangs and you have to terminate the program?

If it does in fact return:

tell us what happens when you print the method's return value to the standard output.


 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I guess getTitle may return the contents of the <title> tag - which may not exist.

But there is another method which actually promises to return the URL. That's the one you should try.
 
Niti Kapoor
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Is That  Method which actually returns the URL?
 
Tim Moores
Saloon Keeper
Posts: 7547
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's obvious from reading the WebEngine javadocs.
 
I knew that guy would be trouble! Thanks tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic