Like Roosevelt, it was Eisenhower's military prowess that sprung him to Presidency. But it was Ike's time in Europe where he learned that Presidents usually inflated the national budget. When pressured by the Pentagon to increase the budget for the defense war chest, Eisenhower refused and kept a well balanced budget.

John F. Kennedy
Top Military Rank: Lieutenant
Active Service: World War II
Branch: United States Navy
Kennedy's service in World War II gave him the critical thinking skills to realize how one problem could cause another and another. This
undoubtedly gave him the decision making skills and the mind-set to handle the Cuban Missile Crisis as calmly and as successfully as he did.

George H.W. Bush
Top Military Rank: Lieutenant
Active Service: World War II
Branch: US Navy Reserve
Big Bush was a pilot. His aviator experience made him knowledgeable about the risks associated with war (He was shot down and lost two of his crewmen). Some believe this encouraged him to support the Powell Doctrine, which states that a list of questions all have to be answered affirmatively before military action can be taken by the United States.
Though there are only six presidents highlighted in the McCain article, there are several other's who's time in the military impacted their presidency. I've taken the time to do some of my own research to find them.

Ulysses S. Grant
Top Military Rank: General
Active Service: Mexican War, Civil War
Branch: US Army
We all know Grant received world-wide fame for leading the Union Army to victory in the Civil War. But, Grant was fighting a war of attrition. Compared to General Lee, he had a larger, better equipped, and better fed army and wasn't afraid to watch men die. That said, he'd win his battles based on sheer numbers. This doesn't take away his unbelievable strategy at
Vicksburg, but it did effect his presidency.
Experts, traditionally view Grant as a President in the bottom quadrant of US Presidents, mostly because of his tolerance of corruption. Grant would often tolerate financial and political corruption among top aids, seemingly unaware of the consequences to those that were being cheated. Though an honest man, Grant appears to have no heart when it comes to the well-being of others.

Jimmy Carter
Top Military Rank: Lieutenant
Active Service: World War II
Branch: US Naval Academy
Carter, had originally planned to make the Navy his career making Chief of Naval Operations his ultimate goal and believed that
submarine duty was the fastest route to get there. Carter thought nuclear power would be increasing in submarines and he wanted to be where the growth was.
Carter did post-graduate work, studying nuclear physics and reactor technology for several months in 1953. This followed Carter's first-hand experience as part of a group of American and Canadian servicemen who took part in cleaning up after a nuclear meltdown at Canada's
Chalk River Laboratories reactor.
His studies and experience helped Carter to understand the power of nuclear technology, knowing that the same science that could keep a submarine submerged underwater for months at a time, could undoubtedly do a lot of damage when used in weaponry. Thus Carter's knowledge of nuclear physics led him to the Strategic Arms Limitations Talks (SALT), which was a treaty aimed at reducing the number of nuclear arms produced and maintained by both the United States and the Soviet Union.
Richard M. Nixon
Top Military Rank: Commander
Active Service: World War II
Branch: US Navy Reserve
While working in the supply corps on several islands in the South Pacific, Nixon who is "not a crook", banked a large sum of money, which in turn helped him finance his first campaign for congress.

Harry S. Truman
Top Military Rank: Colonel
Active Service: World War I
Branch: US Navy Army/Army Reserve
Truman's eye-sight was terrible, and he reportedly secretly memorized the eye chart to pass the test to be enlisted in the Missouri National Guard, where he served from 1905-1911. He rejoined the Guard during the onset of WWI. The War brought out Truman's leadership qualities where he quickly rose to the rank of Colonel. This made possible his political career in Missouri and in turn to the Presidency.
Incidentally, between Truman and Teddy Roosevelt, there were no presidents to serve in the military. This was a run of 6 presidents, and 36 years between them. Taft, Wilson, Harding, Coolidge, Hoover, and finally Franklin Roosevelt, were the 6 in succession not to serve any military duty.
On the opposite side, Bill Clinton, was the first not to serve since FDR. This was a run of 9 presidents and 40 years between them. And although military experience can be very important for the character of the president, it is not, and shall never be a pre-requisite.