The words from the House of Representatives were harsh. They stated, that the war was "unnecessarily and unconstitutionally begun by the President of the United States." And with that, the vote was to officially censure President Polk.
The year was 1848. The United States was emerging victorious in the Mexican-American War. And a lot of people were angry with President Polk as they believed he fabricated the pretext for war in the first place.
Mexico was angered by the United States acquisition of Texas in 1845. They protested that Texas was a rebel province of Mexico and the United States had no right under international law to illegally annex Mexican territory. Further, the official boundary between Texas and Mexico was disputed.
The Oxford Reference Dictionary described what happened next, "The power of the president as commander in chief is at its low point when there is no standing army and Congress must act to raise troops. But when a standing army exists, ready to move at the president's command, the balance of power can shift decisively. The capacity of the president to put the nation at war is illustrated by the actions of President James K. Polk in 1846, when he ordered Gen. Zachary Taylor to occupy disputed territory on the Texas-Mexico border. The order provoked a clash between American and Mexican soldiers, prompting Polk to tell Congress a few weeks later that war exists."
By moving Zachary Taylor and an army into the disputed territory, Polk openly provoked a war with Mexico. War may have occurred anyway. However, it is possible that a diplomatic solution could have worked. Polk's opponents realized later that the President had wanted the war and had used his powers as Commander-in-Chief to make it happen.
As a result, in 1848 the House of Representatives voted to censure the President for his actions. Most notably, Abraham Lincoln (who himself used forced without Congressional approval during his Presidency) was one of the leaders in the House to get the censure passed.
As we listen to debates about the current war in Iraq, it is sobering to realize that this is not the first time that a President of the United States has been accused of starting a war without a good justification. The Mexican-American War ended well for the US despite this.