President Obama has “complete confidence” in Health and Human Services Secretary Kathleen Sebelius, a White House spokesman said, after she apologized Wednesday for the glitch-filled Obamacare website — but also largely blamed contractors for the problems.

"The president has complete confidence in Secretary Sebelius,” Obama spokesman Josh Earnest told reporters aboard Air Force One.

"She took responsibility for many of the problems that are evident with the website, but she also deserves credit for the other aspects of the Affordable Care Act implementation that have gone well," Earnest added.

Sebelius was grilled by lawmakers on the House Energy and Commerce Committee on Wednesday. She told the public to blame her, not Obama, for the website's woes.

It was an uneven performance, as she incorrectly claimed at one point that it was “illegal” for her to sign up for Obamacare exchanges. On whether Obama should be blamed for the the failures of, she replied, “Whatever.”

Earnest defended the health secretary as Obama traveled to Boston to deliver remarks on the Obamacare rollout. The president later Wednesday will argue that Obamacare will eventually work in much the same way the Bay State's health law did after being implemented.

However, former Republican Massachusetts Gov. Mitt Romney, who signed the state law, said Obama was making a misleading comparison.

“Had President Obama actually learned the lessons of Massachusetts health care, millions of Americans would not lose the insurance they were promised they could keep, millions more would not see their premiums skyrocket and the installation of the program would not have been a frustrating embarrassment,” Romney said in a Facebook post Wednesday.

Earnest confirmed to reporters that Romney was not invited to the event at Boston's historic Faneuil Hall.

And he said that certain parallels should be drawn between Obamacare and Romneycare.

“Obviously, Governor Romney's efforts to work in bipartisan fashion to pass health care reform in Massachusetts,” Earnest said, “will be the subject of the president's comments today.”