With the outcome essentially preordained, advocacy groups on both sides of the issue were readying campaigns to try to shape public opinion as the showdown unfolds.

Groups aligned with the Democrats plan to capitalize on the connection between the veto and the “mission accomplished” anniversary. Americans United for Change has produced a television commercial that replays scenes of Mr. Bush on the carrier and says: “He was wrong then. And he’s wrong now. It’s the will of one nation versus the stubbornness of one man.”

Allies of the president are mobilizing as well. The conservative Web site Townhall.com was organizing an online “no surrender” petition, and urging visitors to the site to tell the Democratic Party’s “rogues’ gallery that we will not stand for their defeatism,” adding, “While they may lack courage, our troops do not and they deserve the resources needed to win this war.”

With the vote barely behind them, House Democrats were already considering how to respond legislatively to Mr. Bush’s veto. Though there are differing ideas, Representative John P. Murtha of Pennsylvania, a Democrat who oversees defense appropriations, said his preference would be to “robustly fund the troops for two months,” and include benchmarks but no timetable for withdrawal.

The briefing by General Petraeus and other senior Pentagon officials appeared to do little to influence the House vote. Lawmakers said the commander had made no overt plea for them to oppose the legislation, which provides more money for the Pentagon than the president had sought for the war as well as billions of dollars for other unrelated projects.

“I’m not going to get into the minefield of discussions about various legislative proposals,” General Petraeus told reporters at the end of the two briefings. “I don’t think that is something military commanders should get into.”

The general pointed to a drop in sectarian killings and security gains in Anbar Province as improvements in recent weeks but referred to reversals as well. “The ability of Al Qaeda to conduct horrific, sensational attacks obviously has represented a setback and is an area in which we are focusing considerable attention,” he said.