File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Display Web Page in DIV tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Display Web Page in DIV tag" Watch "Display Web Page in DIV tag" New topic

Display Web Page in DIV tag

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1532
I know this is probably a "not so smart" question but I want to display a web page(http://XXX) in my DIV tag on initial start up. It is an internal Quality Assurance App and I want to display the Quality Statement in the body of my page on app start up. I want to link it to the source so if it changes I will have the latest rev automatically.
David Newton

Joined: Sep 29, 2008
Posts: 12617

c:import? Ajax?

I'm not sure what you mean by "linking it to the source"... wouldn't you be deploying the latest JSP/whatever with your app? How would that not be getting the latest?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62758

You can't. It is not valid to insert a full web page (I assume you mean including <html> tags and all) inside the DOM of another.

If it's an HTML fragment that could normally appear within a <div>, that's fine. Otherwise, you'll need to use an <iframe>.

You could use an interval timer to periodically update either approach.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Display Web Page in DIV tag