Taking Kargil after loosing Siachen would have gained immense support. But the way indians replied especially the Bofors deployment and Air strike, that wasn't expected.
It was a good plan strategically but India didn't back down which made this decision of our govt. send a message as the victory was not just for Kargil but also to tell Pakistan and others that India can't be pushed around now.
Both govt. did their best but certain failures at both ends, India's initially and Pakistan's in Kargil war resulted in this outcome.
When Gen. Musharraf planned for Kargil, he never thought that India will in anyway back down, he had somewhat predicted the Indian response, but the objectives of Kargil Op. were pretty clear:
1. Cut off the strategic Srinagar-Leh highway, so that Siachin gets cut-off.
2. Internationalize Kashmir issue again which was for some time finding deaf ears in international circles.
3. Hold the peaks as long as one can, the more the time PA can hold the heights of Kargil, the more the international pressure for cease-fire & India will soon be on the negotiating table discussing how to resolve Kashmir.
But Since Indian govt. din't wanted a full scale war for many reasons - Nuclear conflict, impact on economy, more lives at stake, etc., India responded locally but with such a massive force that PA could have never imagined. Though not wanting a full scale war did not tied Indian armed forces hands completely, IAF was given orders to shoot down any plane crossing international border (Atlantique incident), IN was given the orders to put a blockade of Karachi port if the conflict extends for few more days to squeeze the supply lines of the PA. Thus a massive response, imminent blockade by IN, political pressures, etc. forced Pakistani leadership to retreat & Kargil Op. though a strategic masterpiece by PA turned out to be a Political blunder.
Kargil war gives us the best example that though Nuclear weapon can avoid (to some extent) a full scale war, but they cannot bogged down nations to fight a localized conflict to achieve some strategic gains, thus we should not lose focus of our conventional capability even in this nuclear age.