Jim, Thanks for the quick response, I should of realized that I can set the header from my controllers. However this made me think about times when there is no controller present. For cases like these, I think the aformentioned solution of adding the content-type and filename attributes is perfect. I also agree that if the controller sets the content-disposition header then that should take presedent over anything in the mav config.
-Mike On 7/22/02 9:04 AM, "jim moore" <[EMAIL PROTECTED]> wrote: > Right now it is possible to set the content-dispostion header directly from > the controller. You can get the Response from the ControllerContext and then > just call response.setHeader() on it. Even when the repsonse is wrapped, the > setHeader() calls are passed through to the real underlying response. I > think this is pretty straightforward and intuitive, so I don't think there > is really a need to change it (though I am open to hearing other thoughts on > this). > > If people still think its worthwhile to have this defined in maverick.xml, I > have a couple of ideas. We could add two optional attributes to the fop > transform node: filename and content-type. Filename is pretty > self-explanatory. Content-type would take either "inline" (which would be > the default) and "attachment". Together these two would produce a > content-disposition header something like: > > Content-disposition: attachment; filename=myfile.pdf > > So you would have a node that looked something like: > > <transform type="fop" output="pdf" content-type="attachment" > filename="myfile.pdf"/> > > Even if we add this, I still think the controller should take precedence. > Since it runs before the transform, opt-fop could check for the presence of > the content-disposition header. It would only set it if it didn't find it. > Does this make sense? > > What are everyone's thoughts? Do you think setting the header from the > controller is sufficient, or should we add these params to the transform > node? > > --jim ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Mav-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mav-user Archives are available at http://www.mail-archive.com/
