The real tragedy of Iraq and Vietnam... and most history, in fact, is that people will learn the wrong lessons. In both cases, it was how we conducted ourselves, not the action itself, that was at fault. In both cases, huge mistakes were made after the initial phases, and a real strategy was not mapped out... and then each operation has a laundry list of specific mistakes.
The basic mistake of both wars is that the military was not allowed to run them. They were ran from the White House and the Senate floor. They were ran by the protesters and the media. The politician's job is to tell the military men who to fight, they should then go hands off and let the military decide how and when to do the fighting.