Hai,
Hv u chkeck by putting System.out.println(p). it returns null or some other value like
java/lang/String].
u do one thing.
just add one more check in ur if condition.
..
try
{
String p=request.getParameter("ID");
if(p != null && !p.equals(""))
{
String to=p+"@asiamail.com";
}
else
{
String to="[EMAIL PROTECTED]";
}
}
..
..
regards
siva
-----------------------------------------
Sivakumar.S
Deutsche Bank AG, APHO,
IT/CS-Ecommerce,
8 Shenton Way,
#19-03, Temasak Tower,
Singapore-068811.
Phone : (065) 423 8727 (Off)
(065) 564 6277(
---------------------------------------- Message History
----------------------------------------
From: [EMAIL PROTECTED] on 04/04/2001 02:57
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
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
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
___________________________________________________________________________
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