Editor's note: Julian E. Zelizer is a professor of history and public affairs at Princeton University's Woodrow Wilson School. His new book, "Arsenal of Democracy: The Politics of National Security -- From World War II to the War on Terrorism," will be published this fall by Basic Books. Zelizer writes widely about current events.

Julian E. Zelizer says President Obama has been struggling with national security issues.

(CNN) -- President Obama has been struggling to get things right on national security. The president has not displayed the same kind of poise and confidence as he has with domestic issues.

In contrast to the economic stimulus and health care reform, there have been a number of missteps, reversals and intra-party tensions over national security since Obama took office.

Obama, who in February 2008 said the trials of Guantanamo detainees were "too important to be held in a flawed military commission system," now says that he will continue to use that system, though in slightly modified fashion. When Obama announced that he would not release photographs of mistreated detainees, many of his supporters could not help but be disappointed.

The most recent controversy has been the battle over a briefing about the CIA's interrogation methods. The battle has been damaging to Democrats because it pits House Speaker Nancy Pelosi against the CIA. The controversy has inspired Republicans to argue that Democrats were complicit in the interrogation methods they have been criticizing.

Republicans have jumped at this opening. Former Vice President Dick Cheney has sounded as if he is running for the presidency in 2012, repeatedly complaining that the nation is less safe than it was under President Bush. Republicans are out in full force with the old mantra that Democrats are weak on defense.

Many Democrats are nervous. The party lives with the fear that Republicans have held a national security advantage over Democrats since the 1960s, with Democrats perceived as the party of George McGovern and Republicans as the party of Ronald Reagan. According to this logic, Americans are more likely to trust Republicans when dealing with national security.

The perception is grossly exaggerated. Indeed, the 2006 and 2008 elections showed that in many instances Americans have been far from pleased with the strategy of Republicans and more open to diplomacy and the rule of law. A new survey released by Democracy Corps and Greenberg Quinlan Rosner (based on phone surveys between May 10 and May 12) finds that voters now trust Democrats as much as Republicans to handle national security and prefer the Democrats on issues like Afghanistan.

Don't Miss

But Democrats remain scared, even with a politician in the White House who built his entire campaign around directly taking on Republicans in this realm of policy -- refusing to back down on issues like Iraq and torture.

Democrats have three choices. The first is to be defensive, avoid clear positions and just work on rejecting Republican accusations. The second is to stand in a circle and start firing at each other. The third is to take a proactive stand by offering a coherent agenda of what Democrats hope to accomplish.

Great politicians turn moments of adversity into opportunity. President Obama and congressional Democrats must start to tackle several important questions. The first is what are the rules of engagement in the war on terrorism?

The basic argument promoted by the GOP has implied that there should be no restraint when we pursue terrorists. This is the kind of argument that allowed for the CIA to conduct assassination operations in the 1950s and 1960s during the Cold War against communism.

Democrats have been reluctant to offer a bold response. Their best bet would be to argue that this is a nation built around constitutional law and that it is not an option that we combat national security threats by eroding our own foundation. The other central argument must rest on the extensive evidence showing that boundless interrogation does not guarantee good results, and in fact can often produce bad information. Torture also makes it difficult to protect our own captive soldiers in the future.

When the controversy flared over Pelosi's level of knowledge about harsh interrogation tactics, her press conference turned into a media frenzy about what was said at a briefing seven years ago. The focus was shifted away from the prime issue -- what methods were used by the CIA under President Bush and whether laws were broken in the interrogations.

If Pelosi was told about the tactics, which is not clear, her credibility on her exact knowledge is in doubt. But few can dispute that Pelosi and congressional Democrats have been vocally criticizing these tactics for many years. In fact, this has been a main point made by Republicans who have criticized her.

The second question has to be what the administration's goals are with regard to homeland defense. Democrats had been extraordinarily critical of the Bush administration for speaking a tough game but not doing enough. Since 2006, Democrats have spoken about areas of vulnerability, like port security and bioterrorism, where, they say, Republicans had refused to invest sufficient resources needed to ensure the safety of the nation.

But other than a few provisions that were contained in the economic stimulus bill that dealt with these issues, Obama has been relatively quiet about his homeland security plans.

The final issue has to do with America's role overseas. President Obama, as a candidate, defined himself by rejecting President Bush's decision to go to war in Iraq and his failure to conduct diplomacy. This was a defining argument in the Democratic primaries, when he and his supporters lashed out against then-Sen. Hillary Clinton for having been too timid in taking on the president. But now the tide has turned. It is far from clear where this White House is going overseas.

We have a growing military engagement in Afghanistan, the possibility of greater involvement in Pakistan, and the announcement that Obama plans to leave between 30,000 and 50,000 troops in Iraq after the "withdrawal" next year. To be sure, Obama has sent Clinton to embark on a more ambitious diplomatic agenda, but we have only seen the outlines of what they hope to achieve. The administration must start explaining what the primary objectives of its foreign policy will be.

The more thought that goes into what we are doing before a crisis hits, the better prepared we are to deal with a crisis should it occur.

But Democrats have a political incentive to be proactive as well. Democrats have shown in the previous two elections that Republicans don't have an electoral monopoly on national security debates. But unless they provide a bold and coherent vision of their alternative, Democrats will continue to play defense.

The opinions expressed in this commentary are solely those of Julian Zelizer.