On 7/30/02 1:15 PM, "Daniel Rall" <[EMAIL PROTECTED]> wrote:
> "Geir Magnusson Jr." <[EMAIL PROTECTED]> writes: > >> On 7/30/02 8:44 AM, "Rickard" <[EMAIL PROTECTED]> wrote: >> >>> Hey >>> >>> I need to change mergeTemplate() in VelocityServlet so that it uses >>> getWriter() instead of getOutputStream() (since I have code later on >>> that uses getWriter() and you can't mix). The easiest fix for me would >>> be to simply subclass VelocityServlet and implement mergeTemplate() with >>> this, but it turns out that the writerPool is private so I can't use that. >>> >>> Request: >>> 1) Either change the writerPool in VelocityServlet to protected >>> 2) Change mergeTemplate() in VelocityServlet to use getWriter in the >>> first place >>> >>> Either would be ok. >>> >>> Is there any reason in particular why getOutputStream() is used instead >>> of getWriter() there? >>> >> >> Because we miss you and wanted you to come back. >> >> 1) Worries me as you can forget to put back. However, one might argue that >> you take our chances when doing this.... >> >> 2) Only worries is that not-Rickard will come and say "Hey, you are using >> writer an I need the output stream later..", but as we never made any >> promises re this, it may be ok. >> >> Thinking about it, if we can keep the writer pool protected, we might as >> well do that, so lets go with #2. >> >> Anyone care if we change what mergeTemplate() uses? > > What effect does this have on character encodings? Well... In theory, none, as we would do something like req.setContentType() Before doing anything. However, this is a good question - how will this effect other parts of a portlet app? -- Geir Magnusson Jr. Research & Development, Adeptra Inc. [EMAIL PROTECTED] +1-203-247-1713 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
