Question: who was president of the united states at the time of the mexican war?
Answer: Zachary Taylor, a general and national hero in the United States Army from the time of the Mexican-American War and the War of 1812, was elected the 12th U.S. President, serving from March 1849 until his death in July 1850.