America's entry into the European theater of World War II was a military disaster at Kasserine Pass. We suffered heavy casualties and were pushed back over fifty miles. Taking the measure of this force, the Axis powers were smug -- the Americans might be fresh to the fight and have enormous resources, but there was little reason to believe any of their advantages would make a difference.
But after his initial successes against the U.S. military, Rommel wrote worriedly to his wife that although the Americans made mistakes, they were learning from them. And indeed, after our losses in the Tobruk campaign, the American military replaced ineffectual commanders, reorganized units to improve operational control and coordination, trained better fundamental soldiering skills.
Looking back across the decade of America's response to the al Qaeda threat that resulted in the attacks of September 11th, both our government and our military made assessments and improvements of similar magnitude: revamping our intelligence collection and assessment, developing strategies for countering insurgencies, building intellectual capital on the nature of the threats and means for disrupting and destroying them, finding ways to balance liberties and security in ways our public will support and sustain.