3 Replies Latest reply on Aug 21, 2002 12:35 PM by dudoes

    problem of Null String

    dudoes

      I use Jboss3.0.1RC1/Tomcat4.0.4£¬I have got a strange problem:

      System display "null" on page When a String gotten from DB is empty.

      I hate "null", I can accept a empty String, "",etc.,rathen than a string whose content is "null".

      Weblogic6.1 have not the same problem.

      How can i config System to return a empty String instead of a "null" String? because it destoy my page.

      Must I check every String if it is empty and convert it to a empty String by myself,not to a "null" String automatically by system?


      I need your help.


      thanks

        • 1. Re: problem of Null String
          joelvogt

          eh? If your String is null, then it will display as null, if it is empty string it will display as empty string. I don't think jboss has too much to do with this

          • 2. Re: problem of Null String
            dudoes

            Yeh,

            if the String is empty with nothing it display "null", but i hope it display ""(a String with "",not a String "null").

            Weblogic6.1 has not this problem,Maybe Weblogic have handled the empty String to a "" String before sending to page.

            • 3. Re: problem of Null String
              dudoes

              ?
              ....
              ?
              ..........
              !

              I have to check the every String in every getXXX() method of Bean Class of every Entity Beans.