sigh....
if ( (name != null) && (name.length() != 0) )
{
}
> -----Original Message-----
> From: It, Cockpit (CAP, Contractor) [SMTP:[EMAIL PROTECTED]]
> Sent: 07 June 2002 10:53
> To: [EMAIL PROTECTED]
> Subject: Re: Check This
>
> This code will surely throw up an error if name variable is null....
> you have to check like
> if(!name == null || !name.length() ==0 ) { instead...
> because you are checking the lenght of the String first which possibly
> null...
>
> Happy Programming..
>
> YOgaraj
>
> -----Original Message-----
> From: Daniel Jayapaul [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 2:13 PM
> To: [EMAIL PROTECTED]
> Subject: Check This
>
>
> Hi Vaishali
>
> Check This,,,,
>
>
> if (mode.equals("1")){
> String name=request.getParameter("ename");
> if( !name.length() ==0 || !name == null) {
> String updqry="update hrm_employee_mas set emp_empname = '" + name +
> "' where emp_employee_no = " + emp;
> }else {
> out.println(name);
> }
>
> }
>
> ==========================================================================
> =
> 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://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
>
> "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
> ADDRESSEE and may contain confidential and privileged information.
> If the reader of this message is not the intended recipient,
> you are notified that any dissemination, distribution or copy of this
> communication is strictly Prohibited.
> If you have received this message by error, please notify us
> immediately, return the original mail to the sender and delete the
> message from your system."
>
> ==========================================================================
> =
> 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://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
--
**********************************************************************
The Truworths e-mail facility may not be used for the distribution of
chain letters or offensive email. Truworths hereby distances itself
from and accepts no liability for the unauthorised use of its e-mail
facility or the sending of e-mail communications for other than
strictly business purposes. Truworths furthermore disclaims liability
for any unauthorised instruction for which permission was not granted.
Please report abuse to [EMAIL PROTECTED]
===========================================================================
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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com