Re: Null host causing NullPointerException in CrawlerSessionManagerValve

2024-10-10 Thread Donald I Macdonald
Sgrìobh Rémy Maucherat na leanas 10/10/2024 aig 1:07f: The crawler valve seems to be defined on the Engine, but more importantly it seems you have no default host ? So the request is not being mapped and it would return 404 (but the valve would need some extra null checks). Rémy Ahhh of cour

Re: Null host causing NullPointerException in CrawlerSessionManagerValve

2024-10-10 Thread Rémy Maucherat
On Thu, Oct 10, 2024 at 1:37 PM Donald I Macdonald wrote: > > Hi there, > > I've a tomcat 9.0.91 server (running on Corretto OpenJDK 17.0.12.7.1 + > Amazon Linux 2023). It runs behind nginx (v1.24.0). > > The catalina log records a NPE SEVERE error every few seconds, > complaining that the Host us

Re: Null pointer when calling getRemoteAddr in exception handling

2012-08-20 Thread Konstantin Kolinko
2012/8/20 Peter Cipov : > Hello, > I have encountered ambiguous feature/bug of request > > ...servlet code ... > > throw new LoginException(String.format("Login failed for user %s from IP %s > (%s)", > principalName, > request.getRemoteAddr(), > type

Re: Null component

2011-12-06 Thread Pid
On 06/12/2011 19:35, kccc wrote: > > Hi, > > > I'm a new tomcat user and I'm trying to solve this error: > "SEVERE: Null component > Catalina:type=DataSource,path=/myAPP,host=localhost,class=javax.sql.DataSource,name="PGDS/ActivityLogDS" > > My tomcat and java version: > apache-tomcat-6.0.16 U

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Calum, On 6/21/2011 4:26 AM, Calum wrote: > On 20 June 2011 17:02, Christopher Schultz > wrote: >> That depends on what Service.logHit does. If it only uses the >> HttpServletRequest object during the method's lifetime, then everything >> is fine. I

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-21 Thread Calum
On 20 June 2011 17:02, Christopher Schultz wrote: > That depends on what Service.logHit does. If it only uses the > HttpServletRequest object during the method's lifetime, then everything > is fine. If it retains a reference to the request object, you will > probably end up with a problem. Oh, ju

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jocelyn, On 6/20/2011 4:11 PM, Jocelyn Ireson-Paine wrote: > I do put a reference to > the response into an instance, in order that I can give my main > processing method all the data it needs (including the response) as one > single parameter. But I'

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-20 Thread Jocelyn Ireson-Paine
On Wed, 15 Jun 2011, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jocelyn, On 6/15/2011 1:43 PM, Jocelyn Ireson-Paine wrote: ResponseHolder rh = (ResponseHolder)this_session.getAttribute( "response_holder" ); Here is the beginning of your errors. By savin

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Calum, On 6/20/2011 6:12 AM, Calum wrote: > On 15 June 2011 18:54, Konstantin Kolinko wrote: >> The request and response objects must never be accessed outside the >> request processing cycle. The objects are recycled and cleared or >> reused for su

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-20 Thread Calum
On 15 June 2011 18:54, Konstantin Kolinko wrote: > The request and response objects must never be accessed outside the > request processing cycle.  The objects are recycled and cleared or > reused for subsequent request and responses, and are not guaranteed to > be thread-safe.  The consequences c

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jocelyn, On 6/15/2011 1:43 PM, Jocelyn Ireson-Paine wrote: > ResponseHolder rh = (ResponseHolder)this_session.getAttribute( > "response_holder" ); Here is the beginning of your errors. By saving a reference to the response that was used for y

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-15 Thread Martin Gainty
également obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 15 Jun 2011 18:43:21 +0100 > From: p...@j-paine.org > To: users@tomcat.apache.org > Subject: Re: Nu

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-15 Thread Konstantin Kolinko
2011/6/15 Jocelyn Ireson-Paine : >     ResponseHolder rh = (ResponseHolder)this_session.getAttribute( >  "response_holder" ); >     out.println( "rh = " + rh + "." ); >     if ( rh == null ) { >       out.println( "rh is null." ); >       rh = new ResponseHolder( response ); >       this_session.se

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-15 Thread Jocelyn Ireson-Paine
About a week ago, I reported what seemed like a sporadic null-pointer exception from response.encodeUrl. I've managed to simplify the code that provokes it, and will show it below. My original report, with details of the Tomcat version and so on, is after this mail. The error occurred in a lar

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Mark Thomas
accepter > aucune responsabilité pour le contenu fourni. > > > > > Date: Thu, 9 Jun 2011 09:06:52 +0100 > From: p...@j-paine.org > To: users@tomcat.apache.org; users@tomcat.apache.org > Subject: Re: Null-pointer exception from response.encodeUrl under Windows >

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Caldarale, Charles R
> From: Martin Gainty [mailto:mgai...@hotmail.com] > Subject: RE: Null-pointer exception from response.encodeUrl under Windows > Tomcat 7 > place servletapi-2.3.jar in $CATALINA_HOME/bin Absolute rubbish. Never, never do that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDE

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Martin Gainty
nt être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Thu, 9 Jun 2011 09:06:52 +0100 From: p...@j-paine.org To: users@tomcat.apache.org; users@tomcat.apache.org Subject: Re: Null-pointer exception from response.encodeUrl under Windows To

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Felix Schumacher
Am Donnerstag, den 09.06.2011, 09:40 +0100 schrieb Jocelyn Ireson-Paine: > On Thu, 9 Jun 2011, Felix Schumacher wrote: > > > Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: > >> Hi, > >> > >> I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. > >> This

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Pid
On 09/06/2011 06:52, Caldarale, Charles R wrote: >> From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] >> Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat >> 7 > >> I'm getting sporadic null-pointer exceptions from >> 'response.encodeUrl'. > > First off, let me s

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, Caldarale, Charles R wrote: From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. First off, let me say that it's an unex

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, Felix Schumacher wrote: Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: Hi, I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. This is with Tomcat 7.0.14, the latest stable version to which I upgraded an hour ago, and Java 1.6.0

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi André, On 09.06.11 um 09:07, André Warnier wrote: >> It does. The redirect URL set to the client can be logged with %{Location}o. > I don't think we are talking about a redirect response sent to the client > here. > That would definitely /not/ wo

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, André Warnier wrote: ... By the way : (Interface HttpServletResponse, Javaee 5) encodeUrl String encodeUrl(String url) Deprecated. As of version 2.1, use encodeURL(String url) instead Maybe it's worth replacing encodeUrl by encodeURL, and see if the problem still happe

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Felix Schumacher
Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: > Hi, > > I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. > This is with Tomcat 7.0.14, the latest stable version to which I upgraded > an hour ago, and Java 1.6.0_26, which again I upgraded to at th

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread André Warnier
Thomas Freitag wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chuck, On 06/09/2011 07:52 AM, Caldarale, Charles R wrote: Can you display the original request URL, or perhaps enable the AccessLogValve? (I'm not sure if that captures forwards, however.) It does. The redirect URL set

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-08 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chuck, On 06/09/2011 07:52 AM, Caldarale, Charles R wrote: > Can you display the original request URL, or perhaps enable the > AccessLogValve? (I'm not sure if that captures forwards, however.) It does. The redirect URL set to the client can be

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-08 Thread Caldarale, Charles R
> From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] > Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 > I'm getting sporadic null-pointer exceptions from > 'response.encodeUrl'. First off, let me say that it's an unexpected pleasure to read such a complete (a

Re: null and zero issue

2009-07-17 Thread André Warnier
Russo, Joe wrote: I wrote a web service component using JAX-WS API and deployed on JBoss 5.0.1 application server. And also, wrote a Soap client which sends a valid soap request to server and server executes corresponding method and returns soap response back to client but what ever parameters I

RE: Null value in response.sendRedirect() causes original url tobe invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Null value in response.sendRedirect() causes original url > tobe invoked 20 times > > There's an earlier check in > org/apache/catalina/connector/Response.toAbsolute(String) (called > dir

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/26/2009 1:40 PM, Caldarale, Charles R wrote: >> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: >> Re: Null value in response.sendRedirect() causes original url to be >> invoked 20 times

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Re: Null value in response.sendRedirect() causes original url > to be invoked 20 times > > doesn't setting the Location header boil down eventually > to a string concat Nope, it boils down to an empty

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Re: Null value in response.sendRedirect() causes original url > to be invoked 20 times > > Obviously a NullPointerException is being thrown at some level, Nope, no exceptions are being thrown. There is an exp

RE: Null value in response.sendRedirect() causes original url tobe invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Null value in response.sendRedirect() causes original url > tobe invoked 20 times > > I would say that null cannot be converted into a valid URL, and so > throwing IllegalStateException is a reason

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Jonathan Mast
> "java.lang.> IllegalStateException - If the response was committed or if a > partial URL is given and cannot be converted into a valid URL" I was just about to quote this myself. Perhaps this is not a Tomcat issue per se, but rather a gray area of the Servlet spec. Obviously a NullPointerExcept

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Jonathan Mast
Yeah I'm now doing a null check before the sendRedirect. But why doesn't it throw a NullPointerException, doesn't setting the Location header boil down eventually to a string concat, which in this case be attempted on a null reference? On Fri, Jun 26, 2009 at 12:37 PM, Tim Funk wrote: > LiveHtt

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/26/2009 12:27 PM, Caldarale, Charles R wrote: >> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: >> Null value in response.sendRedirect() causes original url to be >> invoked 20 times >> >> A null value in bounce_url is c

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Tim Funk
LiveHttHeaders is your friend ... Lets assume I have this as foo.jsp: <% response.sendRedirect(null); if (out!=null) {return;} %> http://localhost/foo.jsp GET /foo.jsp HTTP/1.1 Host: localhost HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Content-Type: text/html;charset=UTF-8 Conten

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Null value in response.sendRedirect() causes original url to > be invoked 20 times > > A null value in bounce_url is causing the original Request url to be > invoked exactly 20 times, rather than dying with NullPointerException:

Re: Null Pointer In java.lang.Package.isSealed because of Thread Saftey Issue with Webapp Classloader

2008-02-13 Thread Mark Thomas
Edward Costello wrote: Has anyone else encountered this? Does anyone know if this is fixed in a later version of tomcat, or if there is a work around? You obviously have spent some time looking at the code. You may not be aware of the web interface to svn. Take a look at http://svn.apache.org

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Delian Krustev
On Mon, 28 Jan 2008 22:01:37 + Mark Thomas wrote: > With your specific configuration you might be OK but appBase==docBase is > something that usually always cause pain. Yes, *usually*. And I'm aware of this ;) > My main concern is making sure > that people reading this thread in the archives

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Mark Thomas
Delian Krustev wrote: appBase == docBase is unsupported. Period. The servlet spec allows (might even be requires I don't recall off-hand) any directory to treated as a webapp so as soon as you have an WAR exploded into the appBase you end up with multiple contexts which will cause problems. I d

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Delian Krustev
On Mon, 28 Jan 2008 20:16:14 + Mark Thomas wrote: > Delian Krustev wrote: > > I'm pretty sure > > there is a functionality which could not be achieved otherwise, although > > I could not remember which one at this very moment. > > No, there isn't. If there is, that is a bug that needs to be fix

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Mark Thomas
Delian Krustev wrote: On Sun, 27 Jan 2008 16:01:28 -0800 Hassan Schroeder wrote: Aside from the fact that putting Context elements in server.xml is strongly discouraged I'm pretty sure there is a functionality which could not be achieved otherwise, although I could not remember which one at

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Hassan Schroeder
On Jan 28, 2008 11:34 AM, Delian Krustev <[EMAIL PROTECTED]> wrote: > > having a docBase == appBase is totally wrong, and /will/ cause ugly > problems. > It doesn't cause any problems. And yet you're reporting one :-) > My post is actually a bug report. Not a question. I'd think it hard to cl

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-28 Thread Delian Krustev
On Sun, 27 Jan 2008 16:01:28 -0800 Hassan Schroeder wrote: > Aside from the fact that putting Context elements in server.xml is > strongly discouraged Various people tend to claim the same thing on this list. I'm pretty sure there is a functionality which could not be achieved otherwise, although

Re: Null pointer in manager web app. Tomcat 6.0.14

2008-01-27 Thread Hassan Schroeder
On Jan 27, 2008 3:42 PM, Delian Krustev <[EMAIL PROTECTED]> wrote: > It is Tomcat 6.0.14 started with its security manager enabled. > > The host configuration is as follows: > > appBase="/home/USER/web-root" Aside from the fact that putting Context elements in server.xml is strongly disc

Re: Null datasource trying to connect to JNDI connection.

2007-12-06 Thread Craig Dunn
Any ideas on how to trace whats going on? There are still no exceptions being thrown. Sorry, I've figured that part out now - thanks for your help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-

Re: Null datasource trying to connect to JNDI connection.

2007-12-06 Thread Craig Dunn
Did you see a factory attribute in any of the Tomcat doc for JDBC DataSources? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.h tml OK, Thanks for that - I've removed the Factory setting, placed everything where it is recommended, and yes, I did already have a web.xml

RE: Null datasource trying to connect to JNDI connection.

2007-12-06 Thread Caldarale, Charles R
> From: Mark Shifman [mailto:[EMAIL PROTECTED] > Subject: Re: Null datasource trying to connect to JNDI connection. > > What would you do if you wanted to add a different version of > DBCP, ie Commons DBCP 1.3-SNAPSHOT? > Would you put the jar in $CATALINA_HOME/lib and th

Re: Null datasource trying to connect to JNDI connection.

2007-12-06 Thread Mark Shifman
What would you do if you wanted to add a different version of DBCP, ie Commons DBCP 1.3-SNAPSHOT? Would you put the jar in $CATALINA_HOME/lib and then use the factory attribrute? mas Caldarale, Charles R wrote: From: Craig Dunn [mailto:[EMAIL PROTECTED] Subject: Null datasource trying to conne

RE: Null datasource trying to connect to JNDI connection.

2007-12-06 Thread Caldarale, Charles R
> From: Craig Dunn [mailto:[EMAIL PROTECTED] > Subject: Null datasource trying to connect to JNDI connection. > > In my server.xml: The usual comment: don't put elements in server.xml; doc reference: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html > factory="org.apache.commons.dbc

RE: Null

2007-06-29 Thread Gary Evesson
It's a classic! You should submit the conversation to http://worsethanfailure.com/. Gary Evesson Decentrix Inc -Original Message- From: gb1071nx [mailto:[EMAIL PROTECTED] Sent: Friday, June 29, 2007 12:13 PM To: Tomcat Users List Subject: RE: Null Sigh. > -Original

RE: Null

2007-06-29 Thread gb1071nx
Sigh. > -Original Message- > From: domenico di leo [mailto:[EMAIL PROTECTED] > Sent: Friday, June 29, 2007 1:10 PM > To: Tomcat Users List > Subject: Re: Null > > Obviovusily you don't compare two string in this way! > > if (null == rs.getString(&quo

Re: Null

2007-06-29 Thread domenico di leo
rote: are you initializing variables for each column in the DB, or likely not if you're using that array approach? -Original Message- From: PTS [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 9:33 PM To: Tomcat Users List Subject: Re: Null In several of the fields of the d

RE: Null

2007-06-29 Thread Propes, Barry L
are you initializing variables for each column in the DB, or likely not if you're using that array approach? -Original Message- From: PTS [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 9:33 PM To: Tomcat Users List Subject: Re: Null In several of the fields of the dat

Re: Null

2007-06-28 Thread domenico di leo
mensional array. The concept that I was trying to convey to the OP was to do a try catch and return the desired default value of the proper type. Doug - Original Message - From: "domenico di leo" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Wednesday, J

Re: Null

2007-06-27 Thread PTS
ault value of the proper type. Doug - Original Message - From: "domenico di leo" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Wednesday, June 27, 2007 7:08 AM Subject: Re: Null If I have understand your problem is : you receive a lot of null value afth

Re: Null

2007-06-27 Thread domenico di leo
sage- From: PTS [mailto:[EMAIL PROTECTED] Sent: Saturday, June 23, 2007 12:29 PM To: Tomcat Users List Subject: Re: Null I had to deal with a lot of null values coming back from a database. I may have been reinventing the wheel but I wrote a little DBUtil class that I used to sanitize the return

RE: Null

2007-06-25 Thread Propes, Barry L
yeah, this seems like a good solution, too. -Original Message- From: PTS [mailto:[EMAIL PROTECTED] Sent: Saturday, June 23, 2007 12:29 PM To: Tomcat Users List Subject: Re: Null I had to deal with a lot of null values coming back from a database. I may have been reinventing the wheel

Re: Null

2007-06-24 Thread Reinhardt Christiansen
ssage - From: "Mohammed Zabin" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Sunday, June 24, 2007 7:24 AM Subject: Re: Null Thank you very much for your detailed illustration. But the compiler complies that there is no such methods isNull() and wasNul

Re: Null

2007-06-24 Thread Mohammed Zabin
Thank you very much for your detailed illustration. But the compiler complies that there is no such methods isNull() and wasNull() ??? On 6/21/07, Reinhardt Christiansen <[EMAIL PROTECTED]> wrote: - Original Message - From: "Mohammed Zabin" <[EMAIL PROTECTED]> To: "Tomcat Users List"

Re: Null

2007-06-23 Thread PTS
[c]); }catch(Exception e){return "00:00:00";} } Doug - Original Message - From: "Propes, Barry L " <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, June 22, 2007 1:11 PM Subject: RE: Null that doesn't sound rightare you sure you're p

RE: Null

2007-06-22 Thread Propes, Barry L
that doesn't sound rightare you sure you're pulling back a value from a column that's a string? -Original Message- From: Mohammed Zabin [mailto:[EMAIL PROTECTED] Sent: Thursday, June 21, 2007 6:02 AM To: Tomcat Users List Subject: Re: Null I tried it the other way, i

RE: Null

2007-06-22 Thread Propes, Barry L
just set a value to null or ""; if it's null, return (maybe this " ") some value for a space, if you want to paint the border on a table (the HTML part) this is likely the best way to do it. You could populate it with a dash ("-") or some other. -Original Message- From: Mohammed Zabin

Re: Null

2007-06-21 Thread Steve Ochani
;[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Thursday, June 21, 2007 7:24 AM > Subject: Re: Null > > > > The syntax below is correct. There must be something else > > syntactically incorrect in your jsp causing your woes. > > > > -

Re: Null

2007-06-21 Thread Hassan Schroeder
On 6/21/07, Mohammed Zabin <[EMAIL PROTECTED]> wrote: 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. Pass your ResultSet into

Re: Null

2007-06-21 Thread Martin Gainty
d this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Tim Funk" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, June 2

Re: Null

2007-06-21 Thread Reinhardt Christiansen
- Original Message - From: "Mohammed Zabin" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, June 21, 2007 6:45 AM Subject: Null 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 d

Re: Null

2007-06-21 Thread Richard Sayre
There is an ISNULL function in Transact SQL and a NVL function in PL/SQL that will return a default value if the data is null. That is if you don't mind writing separate SQL for each database. On 6/21/07, Mohammed Zabin <[EMAIL PROTECTED]> wrote: Hi All Anyone knows how to deal with null value

Re: Null

2007-06-21 Thread Brantley Hobbs
Mohammed, While it may not work in all browsers, you can try the "empty-cells" CSS property in the table's style. Render the table tag thusly: ... An alternative is what the other guy said; simply check for nulls before rendering, and render a non-breaking space if you have a null. I'd sh

Re: Null

2007-06-21 Thread Tim Funk
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 <[EM

Re: Null

2007-06-21 Thread Mohammed Zabin
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 <[EMAIL PROTECTED]> wrote: if (null == rs.getString("col_foo")) { out.println(" "); } else { // Evil since this doesn't escape the xml - fo

RE: Null

2007-06-21 Thread Scott Marshall
Hi Mohammed This isn't the best forum to ask this kind of question : try something like http://www.javaranch.com/, you'll get good answers from there. As an interim, check for null values before attempting to display any value. Something like Jakarta commons StringUtils package is a big help in k

Re: Null

2007-06-21 Thread Tim Funk
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 t