|
-
when null!=null (jsp)
hello all,
having a little trouble today... i can't test for null correctly. some code:
<%
String thisString = null;
String thisString_sent = request.getParameter("thisString");
if (thisString_sent!=null)
out.print("::"+thisString_sent);
%>
<form method="post" action="#">
<input type="button" onclick="form.submit();" value="<%=thisString_sent%>">
<input type="hidden" name="thisString" id="thisString" value="<%=thisString_sent%>">
</form>
so... request.getParameter("thisString") should receive null from post data and it does as you can see by the button value. so, why does it even enter the if statement? any ideas?
thanks!
newb
Similar Threads
-
Replies: 1
Last Post: 12-29-2005, 04:14 AM
-
Replies: 0
Last Post: 07-19-2005, 08:55 AM
-
Replies: 6
Last Post: 03-02-2001, 02:42 PM
-
Replies: 1
Last Post: 07-26-2000, 02:16 PM
-
Replies: 2
Last Post: 04-07-2000, 01:20 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks