IMO the best way to defend a city is to get rid of the fort altogether and fight the battle out in the field. Even if I am forced to fight a fort battle, I put all of my units outside the fort in battle formation.
If the walls cannot be used as a defensive advantage, all you are doing is boxing your army inside a tiny space where they can't really move, and your artillery can't really shoot. Mortars are great for 1 volley, then they're under your minimum effective range and you're dropping bombs on yourself. If the AI has howitzers you are completely screwed.
If you are in the early game, and if the AI has no artillery yet (first 6 or 8 turns?), the wooden fort does a good job. Defending the walls on a wooden fort when the AI has no artillery is very effective, provided you have a form of bayonet. Once AI has artillery destroy the fort.
Ishmael, melee infantry is easy to kill, just use cavalry.
Didz, if you have to fight in a fort, your cavalry should be outside the fort, their 3 jobs being A) charging enemy units attempting to scale the wall, B) kill AI artillery after most units have committed to attacking the fort, and C) drawing attacking units away from the main assault.
Bookmarks