depending on where ur getting the param:
request.getParameter("param_name") will return null only in the 2nd case.
it will return an empty String in the first case.
verify it urself with this page
<html>
<head></head>
<body>
<% param = request.getParameter("myparam"); %>
My Param: <%= param==null?"null value":param.equals("")?"empty
string":param %>
<form action="testinclude.jsp" method="post">
<input type="Text" name="myparam"><input type="Submit"
value="Submit">
</form>
</body>
</html>
So unless ur doing something different.. in which case.. u need to give more
info.
-Tim
-----Original Message-----
From: Ali Chadorbaf [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: request.getParameter() question
value=request.getParameter("param_name");
The above statement in called page will return null in
two cases:
1-when the "param_name" is passed with no value
2-when the "param_name" didn't pass at all.
How can I differentiate these two. I mean I need to
somehow know whether
Parameter did not pass or passed with no value.
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.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
___________________________________________________________________________
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