|
From: Joost V. <jva...@no...> - 2005-05-27 07:42:33
|
Hi All,=20 =20 I'm using the pfc framework and for the application I'm building I need to = make a link at the client side that forces a save as for a resource (file = from database), so that instead of being displayed in the browser when = clicking on it, the browser should ask to save it on the hard drive.=20 =20 For this I have created a separate servlet which writes the http header as = follows :=20 =20 response.setHeader(Content-Type,text/html);=20 response.setHeader(Content-Disposition, attachment; filename=3D+ (String)ha= sh.get(file_name));=20 =20 I would like to avoid having an additional servlet besides the framework = and would like to implement in the framework using the interface IResource.= =20 Is there a way to change the header from this class so that I don't need = to create an additional servlet or is there another way to force the save = as in a browser ?=20 =20 Thanks in advance,=20 =20 Regards,=20 Joost.=20 |