Pasquale Di Feo writes: > I have developed a simple PostableResource that send an e-mail > from a form. > > I want return a file (specified in ATTR_REPLYFILE) for the response. > > What is the best way ??? The simple answer is: FileInputStream file = new FileInputStream(getValue(ATTR_REPLYFILE,null)); reply.setContentLength(file.available()); reply.setStream(file); reply.setContentType(MIMEType.TEXT_HTML); return reply; Now thr right answer would be to create some FileResource, and to use internal requests, unfortunatelly you will have to wait a couple more weeks to get the details... BTW the problem with the simple way is that as HTTP is getting more and more complex, even simple things - such as serving a file - might need more work then you thought...(weel simple way will work, but it won't take advantage of HTTP/1.1 features) Anselm.Received on Friday, 26 July 1996 13:26:35 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:59:46 GMT