Sen. John F. Kerry (D-Mass.) underwent successful surgery for prostate cancer yesterday, and his doctor said the Democratic presidential candidate should be able to resume a full campaign schedule in about six weeks.

Patrick Walsh, chief of urology at Johns Hopkins University Hospital in Baltimore, said the two-hour operation went "by the book" and the cancer was "beautifully contained" and had not spread beyond the prostate. "I think he's out of the woods now," Walsh said.

Kerry will leave the hospital this weekend, and aides said he expects to resume some campaign activity next week. Campaign manager Jim Jordan said it is unlikely that Kerry will join the other Democratic candidates in speaking at next week's Democratic National Committee meeting. He said Kerry hopes to have private talks with DNC members.

"We hope to get some considerable business done around this meeting," Jordan said.

Kerry's prostate surgery gives a jolt to a presidential campaign that started quickly this year, providing a test for the candidate and his team.

"This is one of those issues where we came down on the side of trying to put out as much information as possible," campaign spokesman Chris Lehane said. "We recognize that when you're running for president, health is an issue that the press and public want to know about."

The campaign assembled a packet of information on Kerry's medical history that included a timeline about the detection of the prostate cancer. Kerry appeared at a news conference on Capitol Hill on Tuesday, and the campaign made Walsh available to reporters by telephone.

If there was any misstep for Kerry, it came at the end of January. When a Boston Globe reporter asked if he had a medical problem, Kerry said no, as did campaign aides who were asked similar questions.

The candidate said Tuesday he chose not to answer truthfully because he had not told some family members and did not want them to learn about his condition in the media. Several political strategists who have been through presidential campaigns said yesterday they doubted that Kerry's lack of candor would prove to be a serious problem.

"I think it's always problematic when you give an incorrect answer, but if you move quickly to get people aimed back at the truth, you can recover," said Mike McCurry, who was White House press secretary in the Clinton administration. "A knowing and willful and preconceived deception is obviously a real problem, and this sounds pretty inadvertent. It's why press secretaries all have weasel answers like 'Not to my knowledge.' "

Jim Dyke, press secretary at the Republican National Committee, said public sympathy will be with Kerry as he recovers but the media or political rivals might revisit the issue later. Health issues always present campaigns with tricky questions of personal privacy vs. the public's need to know whether a political leader has a serious medical condition. In the 2000 campaign, Sen. John McCain (R-Ariz.) released voluminous medical records to beat back suggestions that he had suffered psychological damage as a prisoner of war in Vietnam. Former senator Bill Bradley (D-N.J.), though healthy, was hurt by two occurrences of an irregular heartbeat that came just as the primaries were beginning and had not been previously disclosed.

"Early disclosure is by far the preferable route in dealing with a medical issue," said Anita Dunn, Bradley's communications director in 2000.

Sen. John F. Kerry (D-Mass.) accompanied by his wife, Teresa, walks through the lobby of Johns Hopkins Hospital in Baltimore.