Of course, the war started because surrounding Arab nations didn't accept the UN plan of splitting up that territory - with both good and bad intentions to be sure. But even if you think the intentions of those nations were entirely mosntruous, my point is that the Arab population of Mandatory Palestine were victims of this whole war, and they (and their descendants) are the people who today live in ghettos of Gaza and the West Bank. And it is understandable that they would bear malice on those who caused them or their parents or grandparents to lose their homes, especially when they now live in squalor. And it is also to be expected, though sad, that some of them will turn to terrorism and hurt other innocents in their own turn.
But the existence of terrorists among a population does not give one carte blanche to attack that population.