There are many wars (if you think about it ) where the US territory was attacked. Here are a few.
Revolutionary War: Mainly fought in the 13 colonies (which was the US during the time) Mexican American War: Fought in present-day mainland US's western half World War II: US joined the war because its state Hawaii was attacked Iraqi War (war on terror): Fought because terrorists attacked US home soil (includes twin tower, Pentagon, etc)