Israel has been pretty clear about its goals in Gaza, it wants to wipe out Hamas, and eliminate an organization that has openly dedicated itself to the destruction of Israel, and enthusiastically advocates killing Jews whenever, and wherever they can. But this brings up another issue, that of finally settling the "Palestinian question." Part of this solution is agreeing on what the borders shall be for the new Palestinian state. The Palestinians want the original 1967 borders, while the Israelis want to make some modifications (like keeping control of Jerusalem). It gets worse, with Palestinians insisting that those who fled Israel in 1948, and their descendents, be allowed to return.
Well, here's another solution; the "no-state" solution. Instead of continuing the arguments over the 1967 borders, why not go back to the 1967 politics. In short, convince Jordan to take back the West Bank (which it ran until 1967, and claimed as lost territory until 1988, when it ceded control to the "Palestinians.") Convince Egypt to take the Gaza Strip (which has been part of Egypt for most of the last few thousand years.) Israel and Jordan work out a deal, perhaps with some international organizations, for running Jerusalem. Then get the Arab states to stop treating all the Palestinians like refugees, and absorb them (as Israel did for all the Jews driven out of Arab countries after the 1948 Arab-Israeli war.)
Egypt might seem an unlikely host for 1.5 million Arab refugees in Gaza. But Egypt is well aware of the fact that Gaza is becoming a refuge for Islamic terrorists who direct their attacks at Egypt, as well as Israel. If Egypt wants to deal with that problem, the best way is to make all those refugees Egyptian citizens, and subject them to Egyptian law (and counter-terrorism efforts, if need be.)
And let us not forget how the problem started. The Arabs that left what-is-now-Israel in 1948 were convinced by the Arab countries to remain refugees for 60 years, on the promise that the Arab world would crush the new state of Israel. That didn't happen, and isn't likely to happen anytime soon. The Arab world has been getting more and more impatient with the Palestinians, and their inability to get along with each other, rule themselves or work out a deal with Israel. So let's just admit that the two-state solution isn't going to work, give the Arab refugees (actually, the children and grandchildren) a place to call home (the places where they are living now) and move on. The alternative is more head-butting by the Arab radicals (Palestinians, mainly) and misery for the refugees who, if they were treated like the 1948 Jewish refugees, would be a lot better off today.
In other words, get over past defeats and move on. But the chance of this solution getting accepted is low. The Arab world has been in the habit, for centuries, of adopting failed solutions, and sticking with them no matter what. This has resulted in poor economic, educational and political performance. Despite all the oil wealth, literacy, economic growth and all manner of performance indicators are among the lowest on the planet. We are dealing with a self-destructive culture that likes to blame others for their problems, problems they could easily solve themselves. But you never know. Bold solutions have been accepted here, occasionally, in the past. It's rare, and one can only hope. Because hope is about all that's left. The alternative is more generations hatred and violence.