By recognizing that ISIS didn't magically appear out of nowhere and address that. You can't just cherrypick where and when we want to look at history. Can't expect to get good long term solutions when you're only looking at the recent past.
If I control the borders of the country next door to mines, which means I control access to resources, their peoples' movement, and I have my people putting up houses on their land, I wouldn't be surprised if that results in retaliation at some point. How can I even honestly say they have a country ?
I would recognize that no long term solution is going to happen without addressing that.
For the short term, the military isn't going to fix this. You're just making more future terrorists. The kid that lost his eye, or lost his father and sister in one of these IDF strikes isn't going to grow up to be a friend of Israel. You're only giving extremists more fuel.