Hello Mike,
Wednesday, April 04, 2001, 2:42:29 PM, you wrote:
MH> It was sort of correct. The whole thin should have been
MH> String p1= String.valueOf(p);
MH> if(p1.equals("null"))......
thats strange why getParameter returns non null value if there is no
parameter in the query. REALLY. becouse it HAVE to.
MH> -----Original Message-----
MH> From: Jay Burgess <[EMAIL PROTECTED]>
MH> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
MH> Date: Wednesday, April 04, 2001 8:32 AM
MH> Subject: Re: Simple Problem....
>>Your response is not correct. If p is null, then there is no object, so
>>there is no equals() method to call. You'll get NullPointerException if
>>you try to execute your example and p is null.
>>
>>Jay
>>
>>-----Original Message-----
>>From: Poornima Visvesvaran [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, April 04, 2001 7:00 AM
>>To: [EMAIL PROTECTED]
>>Subject: Re: Simple Problem....
>>
>>
>>Hi,
>>
>>instead of if(p!=null),
>>
>>use
>>
>>if(!(p.equals(null))
>>{}
>>
>>It will work.
>>
>>Poornima Visvesvaran.
>>--- "Artigas, Ricardo Y." <[EMAIL PROTECTED]> wrote:
>> > Maybe the value of parameter "ID" is spaces.
>> >
>> > :^)
>> > Ricky Y. Artigas
>> > Analyst/Programmer
>> > Information Technology Division
>> > Easycall Communications Phils., Inc.
>> > - Easycall Internet -
>> > 418 Arayat St., Mandaluyong City 1550, Philippines
>> > Personal WAP Site:
>> > http://www.buzzed.co.uk/mobile/?rya
>> > Company Website: http://www.easycall.com.ph
>> > Tel.no: (+632) 5338001 ext.6574
>> > Mobile:(+63) 0917-8951783
>> > Pager: 141-002955
>> > Email: [EMAIL PROTECTED]
>> >
>> >
>> > > -------------------------------
>> > > IMPORTANT NOTICE:
>> >
>> > > This message (and any attachment hereto) may
>> > contain privileged and/or
>> > > confidential information specific to EasyCall. If
>> > you are not the intended
>> > > addressee indicated in this message, you may not
>> > copy or disseminate this
>> > > message (or any attachment hereto) to anyone.
>> > Instead, please destroy this
>> > > message (and any attachment hereto), and kindly
>> > notify the sender by reply
>> > > email. Any information in this message (and any
>> > attachment thereto) that
>> > > do not relate to the official business of EasyCall
>> > shall be understood as
>> > > neither given nor endorsed by the company.
>> > >
>> > >
>> > > -----Original Message-----
>> > > From: irene_plj asiamail.com
>> > [SMTP:[EMAIL PROTECTED]]
>> > > Sent: Wednesday, April 04, 2001 10:57 AM
>> > > To: [EMAIL PROTECTED]
>> > > Subject: Simple Problem....
>> > >
>> > > Hi all ,
>> > >
>> > > The problem wf the below code(part of my
>> > servlet)is i always get the "if"
>> > > condition even if it "p" equals null..
>> > > Wat could be wrong???
>> > > This is such a simple problem but i jus cannot get
>> > the "else" condition
>> > > when p==null.
>> > > Anyone any idea why this cannot work??
>> > > Thks .
>> > >
>> > > ******************************************
>> > > ..
>> > > ..
>> > > try
>> > > {
>> > > String p=request.getParameter("ID");
>> > > if(p != null)
>> > > {
>> > > String to=p+"@asiamail.com";
>> > > }
>> > > else
>> > > {
>> > > String to="[EMAIL PROTECTED]";
>> > > }
>> > >
>> > > }
>> > > ..
>> > > ..
>> > > **********************************************
>> > > --
>> > >
>> > > _______________________________________________
>> > > Get your free email from
>> > http://freemail.asiamail.com
>> > >
>> > >
>> >
>>
>>___________________________________________________________________________
>>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>>of the message "signoff SERVLET-INTEREST".
>>
>>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>>Resources: http://java.sun.com/products/servlet/external-resources.html
>>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
MH> ___________________________________________________________________________
MH> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
MH> of the message "signoff SERVLET-INTEREST".
MH> Archives: http://archives.java.sun.com/archives/servlet-interest.html
MH> Resources: http://java.sun.com/products/servlet/external-resources.html
MH> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--
Alexander Fedorov
Software developer
Adcore
Wibautstraat 120
1091 GP Amsterdam
the Netherlands
tel: +31 (0)20 561 1825
fax: +31 (0)20 5611701 or +31 (0)20 5611849
e-mail: mailto:[EMAIL PROTECTED]
www.adcore.nl
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6
mQEPAzp+jaIAAAEIAKB37EITxsVevyCDd9hOmtLhyzncJZ94UIhi/yflAk8c3xr+
1lFkXpXrs7PhmzTzzojmJQulUIBwV8IHVi3P3sua4PpcRWtAzbGfP4G4rsGcBKdi
09xkELSEtfICsBU3/haQQIB2UH/T/zAefFaRj3XRI/Mqwhz1v6uqwy3zWtKpJWVE
RpeA6ShMd+w7Gp5NvsomUjEpZRIZLWBHpcbjsn34A1VLUMw272e2o9ndV91nDcFf
SFZQpNCUdhM7eM9x4ab6pIrLkWlvDehQnBAyXs95Zxviwhmd37fBWM4MA3V9GsLv
ZxJ1WmmPyu4Hv/7tTYNDSlODHYU5jIZg+jBbvJUAEQEAAbQwQWxleGFuZGVyIEZl
ZG9yb3YgPGFsZXhhbmRlci5mZWRvcm92QGFkY29yZS5jb20+
=Ak1z
-----END PGP PUBLIC KEY BLOCK-----
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html