my gwt application is deployed in tomcat like a war (via maven-gwt-
plugin).
Application downloads a file from a generic url in a temp-dir.
Now I'm interested to display this downloaded file in iframe.
This doesn't work:
<iframe src="file:///temp-dir-path/file.html"...
The only way is put this file in context path like this (done
manually):
<iframe src="http://localhost:8080/myapp/temp-dir-path/file.html"...
and it works.
How can I do this?
Is it the right way? Or are there alternatives?
Thanks,
Julio
how can via RPC server flush a html file (like a stream of bytes for
example) to client and client put this stream in iframe to display it?
can you simply format correct URL for GET requests (url+params) and
use it as property for your "src" tag in iframe?
regards,
Peter
you mean:
<iframe src="/myapp/load.do?url=\"http://www,google.com\""....
where load.do is a servlet that flushes stream of page-bytes to client
via GET/response
but I would like know if it's (and how) possible via GWT-RPC
Thanks,
Julio
On 2 Set, 23:57, Peter Blazejewicz <peter.blazejew...@gmail.com>
wrote:
regards,
Peter
File file = new File ("/path/index.html");
// Prepare streams.
BufferedInputStream input = null;
BufferedOutputStream output = null;
try {
// Open file file.
input = new BufferedInputStream(new
FileInputStream(file));
int contentLength = input.available();
// Init servlet response.
response.reset();
response.setContentLength(contentLength);
response.setContentType("application/octet-stream");
response.setHeader("Content-disposition", "attachment;
filename=\"index.html\"");
output = new
BufferedOutputStream(response.getOutputStream());
// Write file contents to response.
while (contentLength-- > 0) {
output.write(input.read());
}
output.flush();
} catch (IOException e) {
// Something went wrong?
e.printStackTrace();
} finally {
input.close();
output.close();
}
}
but a popup dialog is open that ask if open or save that file!!!!!
how can avoid this popup-dialog?????????
Thanks,
Julio
On 3 Set, 21:53, Peter Blazejewicz <peter.blazejew...@gmail.com>
wrote:
> hi,
> for your interest, someone posted already similiar topic (content of
> iframe):http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...