What if the value is null and the var does not exist in the particular scope for c : set?
, Ranch Hand
Above is copied from bert's book.
Now let us imagine that value is null.
And the attribute "userLevel" does not exist.
I know that if the value is null, then the var is removed from the scope. If the scope is default then it starts looking at page scope, then request, then session , then..
And if the var does not exist, then it is created in the scope specified and if no scope specified then on default page scope.
What if the value is null and the var does not exist in the particular scope?
, Saloon Keeper
Nothing happens, no error occurs, and no variable is created in scope with that name. You can verify it with the following code:
and it outputs: beestje waardeJN
("waardeJN" was put in the session by my servlet, "beestje" was printed to show that param.aapje doesn't contain any value)
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards
All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2017 01:30:30.