Grr, stupidity abounds. The Phalanx was composed of Long Spears roughly 12ft and longer.
The legions used a mix of Spears (7ft and smaller), gladius (Backup weapon and latter replaced by Spatha long swords), and javelins.
Each period was different and the Romans employed mercs with different sets of weapons.