Hi All,
I have a JSP that uses a Java Bean to get data from DB2. I am trying to
use an IF statement in the JSP to look for a value returned from the
bean.

Here is the Java beans return statement:

return (java.lang.String) valueAtColumnRow(BV_NBR_COLUMN, index);

In the JSP I want check if this value is ever 000000, so the statement
looks like:

java.lang.String _p0_1 = CN31BVListDBBean.getBV_NBR(0);
java.lang.String checknum = "000000";

 if( _p0_1.equals(checknum)) {
   do something
  }
else {
 do something else
}

I have also tried to use the:
if( _p0_1.compareTo(checknum)) method and it doesn't seem to ever match.

I have also declared the checknum String as:

java.lang.String checknum = new String("000000");

And it doesn't seem to matter.  I know that I have 000000 values coming
in from this bean because I am displaying them in the page.

Any help is appreciated.
Thanks.
--
Jay H. Lang
Chief Technologist
Distributed Computing Professionals Inc.
IBM Certified Specialist - MQSeries
303 277-1873 - Office
303 807-9700 - Cell

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to