Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 28876 invoked from network); 7 May 2007 08:45:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 May 2007 08:45:03 -0000 Received: (qmail 65286 invoked by uid 500); 7 May 2007 08:45:08 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 65234 invoked by uid 500); 7 May 2007 08:45:08 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 65223 invoked by uid 99); 7 May 2007 08:45:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2007 01:45:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [81.169.146.161] (HELO mo-p00-ob.rzone.de) (81.169.146.161) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2007 01:45:00 -0700 Received: from [10.130.1.57] (80.228.111.21) by post.webmailer.de (klopstock mo61) (RZmta 5.9) with ESMTP id D042ffj477tKFC for ; Mon, 7 May 2007 10:44:38 +0200 (MEST) Message-ID: <463EE6F7.4080505@schnurpfeil.de> Date: Mon, 07 May 2007 10:44:39 +0200 From: Udo Schnurpfeil User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: MyFaces Development Subject: Re: Spec interpretation of ResponseWriter? References: <463B10D3.7040903@schnurpfeil.de> <71235db40705040422l45cc1399rbc8d34ae130813da@mail.gmail.com> <6dac79b90705041209mad8db88w4d7798bd520114b3@mail.gmail.com> <463EC5D2.5020308@atanion.com> In-Reply-To: <463EC5D2.5020308@atanion.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RZG-AUTH: l26/GTGyCcCt4Vu0hoNaSz9E9RTo/mZGxJ00XjXkezlAuoRogdFeTx9qLs/U X-RZG-CLASS-ID: mo00 X-Virus-Checked: Checked by ClamAV on apache.org I've just found something in the spec/api (description for startElement): "The element will be closed (i.e. the trailing > added) on any subsequent call to startElement(), writeComment(), writeText(), endDocument(), close(), flush(), or write()." So, I've to fix it in the TobagoResponseWriter Regards, Udo Bernd Bohmann schrieb: > Why i don't use > > writer.flush() > writer.write() > > or > > writer.writeText(null) > writer.write > > If write() should close a starting element why is this not part of the > spec or javadoc? > > Regards > > Bernd > > > Adam Winer wrote: >> No, write() calls must close a starting element. >> Otherwise the following sequence: >> >> >> >> >> >> ... would fail. >> >> -- Adam >> >> >> On 5/4/07, Matthias Wessendorf wrote: >>> Udo, >>> >>> I think you are right, since the write methods are inherited from >>> abstract Writer clazz. >>> >>> >>> Methods inherited from class java.io.Writer >>> close, write, write, write, write, write >>> >>> >>> Therefore no need to close an open starting (HTML) element >>> >>> -M >>> >>> On 5/4/07, Udo Schnurpfeil wrote: >>> > Hi all, >>> > >>> > I have detected a possible problem with the HtmlResponseWriterImpl. >>> > The write(String) method closes the start tag if open, but the >>> spec says: >>> > >>> > 6.4 ResponseWriter >>> > [...] >>> > It supports both low-level and high level APIs for writing character >>> > based information >>> > The ResponseWriter class extends java.io.Writer, and therefore >>> inherits >>> > these >>> > method signatures for low-level output. >>> > [...] >>> > The write methods write raw >>> > characters directly to the output writer.public void close() throws >>> > IOException; >>> > [...] >>> > >>> > >>> > If a Renderer want to write a content text, he should use writeText() >>> > instead. >>> > >>> > >>> > To explan my problem. >>> > >>> > The TobagoResponseWriter doesn't call the "close-tag", because in >>> some >>> > cases we need possibility to write code without auto-closing. >>> > >>> > I was playing around using Tomahawk components on Tobago pages, >>> and so >>> > this problem appears. >>> > >>> > Any remarks >>> > >>> > Udo >>> > >>> > >>> >>> >>> -- >>> Matthias Wessendorf >>> http://tinyurl.com/fmywh >>> >>> further stuff: >>> blog: http://jroller.com/page/mwessendorf >>> mail: mwessendorf-at-gmail-dot-com >>> >> >