(CNN) -- James Gordon Meek was standing over the gravestone of a friend killed in Iraq when he noticed a familiar figure walking near him.

President Obama was walking through what's called "the saddest acre in America," Section 60 of Arlington National Cemetery in Virginia. The section is the burial ground for U.S. soldiers killed in Iraq and Afghanistan.

Obama hugged graveside visitors, shook hands and listened to mourners while a "bone-chilling drizzle" fell, Meek says. As he watched Obama, Meek says he saw his commander in chief take on a new role: the consoler in chief.

"He absolutely seemed sincere," Meek says about Obama and his Veterans Day visit to Arlington. "What I sensed is that this was a man who is carrying the full weight of command. He gets it."

Obama must now convince the rest of America that he gets this sacrifice. As Obama announces 30,000 more troops for Afghanistan, he also is preparing to fight another battle on the home front, some say.

He must learn how to command and console at the same time.

It's a challenge every war president from Abraham Lincoln to George W. Bush has faced -- some better than others, historians say. A president must project confidence and resolve. But he must also project empathy without appearing weak or politically calculating.

The father of a fallen soldier whose Arlington grave site Obama recently visited says the president got the balance right. David H. Sharrett Sr. is the father of David H. Sharrett II, a U.S. Army soldier who was killed last year in Iraq.

He says he was touched by Obama's visit to his son's grave site because it didn't seem planned. Obama had been at Arlington that day to lay a wreath but apparently detoured from his schedule to talk to graveside mourners.

"So often we're looking for unscripted moments from our leaders that really give us a glimpse into who they really are," Sharrett says. "I wish every parent who experienced my sacrifice had that kind of moment."

Roles of Lincoln, Reagan cited as 'griever in chief'

In the days ahead, Obama must master those moments to sustain support for the war in Afghanistan, says Jerald Podair, a history professor at Lawrence University in Appleton, Wisconsin.

Podair says Lincoln did this during the Civil War when he wrote a tender letter to the widow Lydia Bixby, who had lost five sons in battle. (During his recent speech on Afghanistan, Obama said that he had to sign letters personally to every fallen soldier's family.)

President Reagan was also at his empathetic best when he honored the victims of the space shuttle Challenger disaster with a tender, poetic speech, Podair says.

"Grief is the one part of a president's job that cannot be spun. It must be personal and come from the heart," Podair says.

Yet the cool and cerebral Obama is not known for opening his heart, Podair says.

"The griever in chief must articulate an uncompromising commitment to the cause for which so much was sacrificed," Podair says. "Can Obama do this for soldiers who die in an Afghanistan war to which his commitment is clearly lukewarm? This may be a bigger challenge than heath care for a president more comfortable with intellect than emotion."

It's a challenge that Obama can meet though if he learns from previous presidents, presidential scholars say.

Michael Wagner, a political science professor at the University of Nebraska-Lincoln, pointed to one of the signature moments from George W. Bush's presidency.

Many Americans still remember Bush standing at the rubble of the World Trade Center with a megaphone after the September 11, 2001, attacks. He vowed to go after the people who attacked his country and sent a message to grieving Americans.

"He wasn't just mourning; he was outlining his plan to respond to the attack when he said that the U.S. would be coming after those that attacked the World Trade Center," Wagner says.

Should Obama publicly salute soldiers' coffins?

How Obama displays his public grief is a more delicate matter, Wagner says.

Obama recently visited Dover Air Force Base in Delaware in the predawn darkness to salute the coffins of soldiers killed in Afghanistan. Under his predecessor, no coffins of fallen soldiers were photographed.

Obama was criticized for trying to score political points off his Dover and Arlington visits. But Wagner says Obama handled both occasions with the right tone because he refused to make a major speech or take reporters' questions.

"Silently honoring the fallen and greeting mourners at Arlington are smart strategies," Wagner says. "But using, say, a day where 10 soldiers die as a backdrop to make a speech about a new direction in war policy is usually a bad strategy."

If Obama bungles a public occasion for mourning, he can permanently damage his ability to lead, some historians say.

President George H.W. Bush was joking with reporters during a televised press conference in 1989 when several news stations decided to show a split-screen image of the coffins of U.S. soldiers recently killed in Panama being taken off military planes, says Gary Woodward, a professor of communication studies at The College of New Jersey.

The elder Bush had no control over the broadcast decision, but the damage was done, says Woodward, who later wrote about the incident in an essay. It reinforced the perception that Bush was out of touch with ordinary Americans, something that would haunt him during his re-election campaign, he says.

"Bush asked that the networks be more careful," Woodward says. "He said, "I could understand why the viewers were concerned about this. They thought their president, at a solemn moment like that, didn't give a damn.' "

How other war presidents bungled their public roles

Other war presidents have misplayed their role as consoler in chief because they seemed to grieve too much, one historian says.

President Lyndon Johnson wrestled so much with the Vietnam War that some of his closest aides wondered if he needed psychiatric help, says Robert Dallek, a presidential historian.

"If a president comes across as breaking down or becoming so emotional by these [war] losses, people lose confidence in his ability to lead the country," Dallek says.

The president who mastered the art of command and consolation was Lincoln, Dallek says.

Lincoln's masterful speeches showed Americans why he was determined to win the Civil War. But the way he visibly aged in a few short years showed Americans that he felt their pain, Dallek says.

"He could communicate his sadness and his sense of loss over the terrible suffering that went on," Dallek says. "But he was also able to show at the same time that he was very determined to win the war. It was a combination of humanity and resolve."

Meek, the visitor to Arlington cemetery, says he saw some of the same qualities in Obama. After Obama visited mourners that day, he spun away from his motorcade and approached Meek with an extended hand. Meek was there to visit the grave site of David H. Sharrett II, the soldier who died last year in Iraq.

Meek, a correspondent covering national security for the New York Daily News, says he was so moved by his conversation with Obama that he wrote a column about this exchange. (Obama didn't know who he was, Meek says.)

The reaction was massive. He received about 900 e-mails, most of them positive, Meek says.

"I heard a lot from people who said I don't like Obama's politics and I'm a Republican, but I have no doubt that he really cares about our men and women in uniform," Meek says.

David H. Sharrett Sr., the father of the fallen soldier at Arlington, shares the same sentiments. He says he once met the younger Bush at a private White House ceremony and both choked up as he talked about his son.

After reading Meek's column, Sharrett says he is convinced that Obama, too, feels the weight of his war decisions.

Sharrett, a retired high school teacher who taught Shakespeare, says he thought about a character from Macbeth when he read about Obama's visit. The character, lamenting the loss of a friend, says it was right for him to show "manly grief."

And it's right for Obama to show the same kind of grief, even if he is the president, Sharrett says.

"There is such a thing as manly grief," Sharrett says. "I don't see it as a weakness. I see it as an enormous strength."