"Our efforts to continue to go after extremist organizations that would do harm to our homeland is uppermost on our minds," Mr. Obama told reporters after spending about two hours at the Defense Department's headquarters.
Mr. Obama underscored that troops and their families have his support and said the U.S. military has carried out its mission under enormous pressure.
For both the wars in Iraq and Afghanistan, Mr. Obama is in the midst of hearing from military commanders and advisers about how best to proceed.
The White House said earlier Wednesday that Mr. Obama's review of how to wind down the war in Iraq will conclude soon.
At the Pentagon, Mr. Obama met with the four military service leaders, one more step toward fulfilling his promise of withdrawing all combat troops from Iraq. He has called for a 16-month withdrawal of troops from Iraq; he did not answer a reporter's question about that matter.
Defense officials told CBS News correspondent Kimberly Dozier the timetable is doable - depending on how the provincial elections go there. But they say that still means potentially leaving behind tens of thousands of support troops - those doing things like providing the Iraqis things they don't have, like satellite and air support and training for Iraqi security forces.
"We're going to have some difficult decisions that we're going to have to make surrounding Iraq and Afghanistan," the president said.
Earlier, White House spokesman Robert Gibbs said Mr. Obama's process is deliberate as he moves toward changing the mission in Iraq.
Asked when Obama will be ready to speak about his decisions on that war, Gibbs said: "I think it will be relatively soon. I don't want to set an exact date."
Defense officials have said they can meet Mr. Obama's campaign pledge, but several have suggested that a fast withdrawal could upset the fragile security now in Iraq.
"We are developing other options as well," Defense Secretary Robert Gates said Tuesday. "We are laying out, with each of the options we will present to him, our view - each of the commander's - of the risks associated with that timeline."
Mr. Obama has asked for more information behind assumptions and for additional analysis, Gates said. "I think that the president will listen to the commanders," he said.
Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, told reporters Tuesday that all the scenarios will meet the president's "desire for a responsible drawdown that preserves the security gains we have made in Iraq and protects our forces."
Mullen said he hoped to give Mr. Obama that menu "in the very near future." Pentagon spokesman Geoff Morrell, however, said there would be no decisions made at Wednesday's meeting.
The Joint Chiefs are among those in the Pentagon hierarchy who have expressed concerns about the effect on the military of long, repeated war tours in Iraq.
Much of Obama's briefing was expected to have centered on the fight in Afghanistan and how Mr. Obama's plans to add forces and resources there will depend in part on the success of the Iraq exit. The Pentagon is nearing an announcement of new troop deployments in Afghanistan, with forces arriving in numbers in the spring and summer.
Defense officials don't want Afghanistan to become Mr. Obama's quagmire, as it's perceived that Iraq became for his predecessor, reports Dozier. They've said in public and private that Afghanistan would be more costly in lives and money to turn around than Iraq - so the goals have to be more modest.
Mr. Obama pledged during his campaign to immediately order the withdrawal of all combat troops from Iraq by May 2010. He said he would call in the Joint Chiefs and tell them so on his first day in office, a bit of campaign hyperbole that has evolved in practice into a series of consultations with military leaders, including commanders in Iraq and Afghanistan.
The new president also has said he would adjust his timeline if it would risk the safety of U.S. troops remaining behind to train Iraqis and fight al Qaeda or if it would cause backsliding in Iraqi stability.