DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24584>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24584

Make VelocityViewServlet fall back to response.getOutputStream() if getWriter() fails





------- Additional Comments From [EMAIL PROTECTED]  2003-11-11 01:11 -------
ok, here's some initial feedback:

why this second check for the '='?
+  index = defaultContentType.indexOf('=', index + CHARSET.length());
+  if (index >= 0)

it seems extraneous.  am i missing something?


second (and more importantly), why is the "encoding" member back?  since we are
now setting it as part of the content-type, we just need to be sure that
setContentType() (which sets the response's content-type) is called before
mergeTemplate() and then retrieve the encoding from
response.getCharacterEncoding() (and only if we have to fall back to the
OutputStream).

i believe that would give more flexibility to subclassers (in terms of
overriding setContentType() or using response.setLocale() and having it still
affect Velocity's output in the case that VVS can't use getWriter())

also, don't bother wrapping the OutputStreamWriter with a PrintWriter.  that
looks like an unnecessary extra layer.  just change the initial "PrintWriter
pw;" to "Writer w;" or something.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to