The military occupation came about because there was an unpleasant response
BEFORE the occupation mate.
In fact there isn't a day that goes by where Israel's "illegitimate" presence on Palestinian lands isn't used to rationalize the terrorism by Hamas, Islamic Jihad, the Ahmed Abu el-Rish Brigades and the Al Aksa Martyrs Brigades. Aside from the very obvious moral weakness in any attempt to excuse intentional violence - with malice aforethought - against civilians by Hamas, Islamic Jihad, the Ahmed Abu el-Rish Brigades and the Al Aksa Martyrs Brigades.
The endlessly-used equation that
the occupation = Palestinian terrorism is false for at least two basic reasons:
1. Palestinians committed terrorist acts against Israel
before the existence of what is now called the "occupation." (Fatah was formed in 1964, it's first terrorist acts in 1965, launched from Jordan, Lebanon and Egyptian-occupied Gaza.)
2. The Palestinian Authority refuses to even fulfil the basic obligation under several internationally-brokered peace agreements - to disarm and dismantle known terror organizations - that could soon end the so-called "occupation."