I have a condition where I have an enrollment form in which if userid is 0 it should show the dummy image and when I edit user from any update, I check for if userid which is no
It is illegal to nest EL expressions: you should inline them. Using JSTL is perfectly valid in your situation. Correcting the mistake, you'll make the code working:
Another solution is to specify all the conditions you want inside an EL of one element. Though it could be heavier and less readable, here it is: