cupakob
cupakob

Reputation: 8531

How to Insert an external jsp in GWT whithout using iframe

i want to insert an external jsp in our gwt app. With the frame widget from GWT that is possible, but this is not exactly, what i'm looking for. The problem is, that with iframe i have more than one DOM...but i wish to have exactly one DOM. Any suggestion, how to solve the problem?

Upvotes: 0

Views: 503

Answers (2)

Jason Hall
Jason Hall

Reputation: 20920

You could fetch the inner page's HTML (using RequestBuilder) and call setInnerHTML() on some element in your DOM.

This is pretty risky, and you'll need to really fully vet the HTML that you're setting in there, but it is possible.

Upvotes: 1

BalusC
BalusC

Reputation: 1108732

You can use JSTL <c:import> to import external resources. You only need to take care that the final HTML is valid and you thus don't end up with nested <html> tags or so.

Upvotes: 0

Related Questions