Re: Problem with if statement

2000-09-08 Thread Jim Bailey
--Original Message- From: Aaron Prohaska [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 07, 2000 3:34 PM To: [EMAIL PROTECTED] Subject: Re: Problem with if statement Thanks everyone. I actually used key.equalsIgnoreCase("AT") and its works perfectly. Aaron

Re: Problem with if statement

2000-09-08 Thread Alarcon Fabio
o this > if(key.equals("AT"). > > > Hope this helps. > > > > >From: Aaron Prohaska <[EMAIL PROTECTED]> > >Reply-To: A mailing list about Java Server Pages specification and > > reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] >

Re: Problem with if statement

2000-09-08 Thread Bansal Peeyush
want to compare for values then u have to use equals() method of the Object class like this.. if(key.equals("AT") { ... } As i think it will help u If not pl revert back. Peeyush Bansal Application developer IBM, Delhi ___

Re: Problem with if statement

2000-09-08 Thread Uday Prajapati
there might be some extra non-printable characters in the key -Original Message- From: maurice coyle [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 1:12 AM To: [EMAIL PROTECTED] Subject: Re: Problem with if statement maybe you should try if(key.equalsIgnoreCase(&qu

Re: Problem with if statement

2000-09-08 Thread maurice coyle
maybe you should try if(key.equalsIgnoreCase("AT"){ ... } works for me. maurice Aaron Prohaska wrote: > > I am trying to do something based on if key is equal to "AT", but I am not > getting any results. It acts as if key is not equal to "AT", but I can use > out.println(key) get "AT". Does any

Re: Problem with if statement

2000-09-07 Thread Tarik Makota
Strings are not compared using == in Java Use String.equals("another string")as Jeniffer pointed out - Original Message - From: Jennifer Buffington <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 07, 2000 3:12 PM Subject: Re: Pro

Re: Problem with if statement

2000-09-07 Thread Jacek Laskowski
Aaron Prohaska wrote: > > Thanks everyone. I actually used key.equalsIgnoreCase("AT") and its works > perfectly. One problem might show up with the above code. If you don't check whether key is not null, then NullPointerException will be thrown. Thus, following Java FAQ, you should write somethin

Re: Problem with if statement

2000-09-07 Thread Aaron Prohaska
- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Pierce Sent: Thursday, September 07, 2000 12:16 PM To: [EMAIL PROTECTED] Subject: Re: [JSP-INTEREST] Problem with if statement try this: if (key.equals("AT")) { // do so

Re: Problem with if statement

2000-09-07 Thread Tim Pierce
try this: if (key.equals("AT")) { // do something } -Original Message- From: Aaron Prohaska [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 07, 2000 1:40 PM To: [EMAIL PROTECTED] Subject: Problem with if statement I am trying to do something based on if key is equal to

Re: Problem with if statement

2000-09-07 Thread Jennifer Buffington
This is a java problem... try if (key.equals("AT") { ... do something... } Look up the difference between == and equals. -Original Message- From: Aaron Prohaska [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 07, 2000 11:40 AM To: [EMAIL PROTECTED] Subject: Probl

Re: Problem with if statement

2000-09-07 Thread Frederik Delacourt
s original dimension." --Oliver Wendell Holmes -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Prohaska Sent: Thursday, September 07, 2000 1:40 PM To: [EMAIL PROTECTED] Subject: Problem with if stat

Re: Problem with if statement

2000-09-07 Thread Kamal Kholiya
Use if (key.equals("AT")) I think these type of question go to general Java mailing list? This list should have only JSP related issues. Thanks - Kamal. Aaron Prohaska wrote: > I am trying to do something based on if key is equal to "AT", but I am not > getting any results. It acts as if key i

Re: Problem with if statement

2000-09-07 Thread Mohammad Alshayeb
t about Java Server Pages specification and > > reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: Problem with if statement > >Date: Thu, 7 Sep 2000 11:39:30 -0700 > > > >I am trying to do something based on if key is equal to "AT&

Re: Problem with if statement

2000-09-07 Thread Irfan Mohammed
PROTECTED]] Sent: Thursday, September 07, 2000 11:39 AM To: [EMAIL PROTECTED] Subject: Problem with if statement I am trying to do something based on if key is equal to "AT", but I am not getting any results. It acts as if key is not equal to "AT", but I can use out.println(key)

Re: Problem with if statement

2000-09-07 Thread Liu
Aaron, I think you have to use something like this: if (key.equals("AT"){ ...do something... } because (supposed) key is a string. Yi Aaron Prohaska wrote: > I am trying to do something based on if key is equal to "AT", but I am not > getting any results. It acts as if key is not equal to "A

Re: Problem with if statement

2000-09-07 Thread Raj S
>To: [EMAIL PROTECTED] >Subject: Problem with if statement >Date: Thu, 7 Sep 2000 11:39:30 -0700 > >I am trying to do something based on if key is equal to "AT", but I am not >getting any results. It acts as if key is not equal to "AT", but I can use >out.println(k

Problem with if statement

2000-09-07 Thread Aaron Prohaska
I am trying to do something based on if key is equal to "AT", but I am not getting any results. It acts as if key is not equal to "AT", but I can use out.println(key) get "AT". Does anyone know why this might not be working? if (key == "AT") { ..do something... } thanks, Aaron