The campaigns do the best they can under the circumstances fate has dealt them. Their campaigns may do better or worse than expected, but the basic trends provide the context of the election contest.
In 2006 the war in Iraq was the dominant issue. Public opinion had moved from support of the war in 2003-2004 to a substantial opposition in 2006. More than 60% judged the war not worth the cost, while only 35% thought it was worth it. Those facts have not changed over the past two years. They provide the basis for Obama's initial run, and the challenge for McCain as a supporter of the war and the surge.
But in a crucial sense opinion of the war has fundamentally changed. The public no longer thinks the war is going badly. In fact the contrary is now true.
This shift says a lot about why we are talking so little about a war 60% still think not worth it, but that the surge, or at least the results, now mean the war is not a burning issue.