Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

can i get other website contents in my webapplication

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we have a web application .In that search by flight number option is there.If i enter flight number ,it has go to the below url and whatever contents are displaying there those contents i want to display it here in my application.for this one i am using URLConnection using this class i will get only contents of the view source to proceed further to accomplish this task?

are there any other options other than this?

class ConnectionTest {
public static void main(String[] args) {
try {
URL travel = new URL("";);
URLConnection travelConnection = travel.openConnection();
DataInputStream dis = new DataInputStream(travelConnection.getInputStream());
String inputLine;

while ((inputLine = dis.readLine()) != null) {
} catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
} catch (IOException ioe) {
System.out.println("IOException: " + ioe);
Posts: 43016
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you want to do is display the contents of the URL, the easiest would be to load it in an IFRAME that's embedded in the web page. That way, the browser gets to do all the work of loading the page.
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic