Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 6680 invoked from network); 21 Jun 2007 11:25:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jun 2007 11:25:13 -0000 Received: (qmail 99229 invoked by uid 500); 21 Jun 2007 11:25:03 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 99203 invoked by uid 500); 21 Jun 2007 11:25:03 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 99192 invoked by uid 99); 21 Jun 2007 11:25:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 04:25:03 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of funkman@joedog.org designates 204.74.20.252 as permitted sender) Received: from [204.74.20.252] (HELO sid.armstrong.com) (204.74.20.252) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 04:24:58 -0700 Received: from [10.38.22.70] (tafunk-lt.americas.armstrong.com [10.38.22.70]) by sid.armstrong.com (8.13.6/8.12.8) with ESMTP id l5LBLoRZ009924 for ; Thu, 21 Jun 2007 07:21:50 -0400 Message-ID: <467A5FF5.10306@joedog.org> Date: Thu, 21 Jun 2007 07:24:37 -0400 From: Tim Funk Organization: Human Being User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Null References: <9c2eb70e0706210345o3db19718q45b00d8f30531e13@mail.gmail.com> <467A596C.7030003@joedog.org> <9c2eb70e0706210401o13b3f94bo6425399f1772e78c@mail.gmail.com> In-Reply-To: <9c2eb70e0706210401o13b3f94bo6425399f1772e78c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The syntax below is correct. There must be something else syntactically incorrect in your jsp causing your woes. -Tim Mohammed Zabin wrote: > I tried it the other way, if( rs.getString("field") == null ) but the > compiler plames that null can't be compared to string.... > > On 6/21/07, Tim Funk wrote: >> >> >> if (null == rs.getString("col_foo")) { >> out.println(" "); >> } else { >> // Evil since this doesn't escape the xml - for edutainment only >> out.println("" + rs.getString("col_foo") + ""); >> } >> >> -Tim >> >> Mohammed Zabin wrote: >> > Hi All >> > >> > Anyone knows how to deal with null values in JDBC ResultSet?? >> > >> > I am trying to render a table in jsp page that read its value from the >> > database, sometimes, the database returns null values, and so, the >> whole >> > table couldn't be rendered. Is there any way to deal with null values. >> > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org