Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String doubt

807569Jun 13 2006 — edited Jun 13 2006
I have a JSP where im setting one of the hidden parameter as null after doing something and when the form is submitted i call my Processview which check for the form element value like this
if (form_element != null) {
my code
}
But this condition fails and went inside . So i tried like this
if(form_element != null && !form_element .equals("null")) {
my code
}

and here is succeeds. What could be the reason?

I have already raised a similar kind of doubt under the sub name
Null Reference vs Null String
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2006
Added on Jun 13 2006
7 comments
56 views