Javelins are also good at the walls, especially over the gates. They can't aim in an arc so they're hits are more direct and they have a higher accuracy. Since javelins are more damaging than arrows, you can deal with a good portion of the column of enemies at the gate before they even enter. Even afterwards, they can turn around and fire into a choke point formed by spearmen. You can even use them behind the spears.

Basically javelins are awesome. They're definitely under-appreciated due to their short range, but I think if you protect them well they can be more damaging than archers. Light-infantry javelins are the best, like Almughavars. Are those in vanilla? The ones in Stainless Steel rock. Great for hurling javelins point blank at the enemy and they forming an effective anvil to any hammer (their defense is higher than spear militia)

In conclusion, Stainless Steel rocks. You should go download it now.