wood burning stoves 2.0*
The moose likes JSF and the fly likes JSF import contents of a HTTP call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF import contents of a HTTP call" Watch "JSF import contents of a HTTP call" New topic
Author

JSF import contents of a HTTP call

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
Hi,

is there a way to import the contents of a HTTP call response into a HTML page? i.e. if i was to make a call to www.google.ie and to import this page into another HTML page,

Thanks,

Niall
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Probably the easiest way to do this is to use frames. Of course, the Elite will sneer at you, and JSF isn't very supportive of frames, but it's still sometimes the simplest solution.

However, since frames are managed solely by the client, if the webapp itself needs to know anything about this HTML stream, then you'll need code in the webapp to do an HTTPURLRequest to the secondary server. Then you'll need to figure out what to do with the returned output. That generally would mean doing something like removing the HTML and HEAD tags and outputting the remainder (suitably reformatted) in an outputText with "escape="false"" set.

On the other hand, you're talking Google, here, and Google is big on web service APIs, so you might just be better off finding one that returns the raw date, then create your own local version of the display.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF import contents of a HTTP call
 
Similar Threads
HTTP Request + web resources
Write into excel from console output using POI library
Dynamic marquee
HTTP error 405
Call servlet class from jsp?