Browser Display Problem [OT?]
Browser Display Problem [OT?]
- Subject: Browser Display Problem [OT?]
- From: Ute Hoffmann <email@hidden>
- Date: Thu, 26 Feb 2004 12:57:44 +0100
Hallo,
this is maybe a bit off topic, but it could be Wo related as well... I
just do not know.
I have a link which returns as its resonse a .pdf-file which is to be
opened inside a windows Internet Explorer. This works just fine.
Now I got a component with a login panel. The user loggs in and if
successful this component returns the page which is really the response
of above, same code, just triggered by a form submit button after a
authentification has taken place.
Behaviour: The page loads but is empty. When I click reload in Internet
Explorer the pdf opens as it should, but only after manually klicking
refresh. Any idea?
Mac Browser do download the .pdf without any problem after the user has
passed the login panel.
My code in the response component:
public void appendToResponse( WOResponse response, WOContext context)
{
fileEinlesen(); //just reads the correct file into youNSDataFile
super.appendToResponse( response, context);
response.setHeader("application/pdf", "content-type");
/*** this header used for open in brower with plug-in, if you don't
have plug-in automactly going window for donwload. */
//response.setHeader("filename=" + fileName, "content-disposition");
/*** this header call directly window for download */
//response.setHeader ("attachment;filename="+ fileName,
"content-disposition");
response.setHeader(new Long( youNSDataFile.length() ).toString(),
"content-length");
response.setContent( youNSDataFile );
}
Thanks for a hint.
Regards,
Ute
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.