> -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper > Sent: Wednesday, December 28, 2005 12:28 AM > To: user@struts.apache.org > Subject: Re: serving binary files > > Daniel Blumenthal wrote: > > Hi there, and happy holidays! > > > > I have an application in which there are certain files > which are only > > accessible by certain users. So, when a request comes to > my "GetFile" > > Action, I first verify that they have the correct permissions, then > > send the file by opening the file and reading it into the response > > output stream (code included below). This works, but seems > > unbelievably hacky, and I was wondering if there were a > better way to do this. > > What you have looks pretty standard. Make sure your action > returns null so Struts knows the response is complete, and > you should be fine. > > L.
Thanks for the reply! I was hoping you would tell me that there was a way to create some kind of forward (or set something in the response) that would tell Tomcat to simply return the correct file. But, if this is the only way, then it's nice not to have to worry about whether or not I'm doing it right. Best, Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]