It wasn't a conventional war. B5 itself was defended by the other races, and had been upgraded shortly before the clark crisis. They also had very good intel (from the rangers) and the goal of the war wasn't to defeat the EA militarily
Initially the goal was to was to help colonies that wanted to declare independence maintain it by preventing indiscriminate attacks on them. With the white stars, B5 was able to do hit and run attacks, but rarely went toe to toe with EA forces.
They also were trying to erode support for Clark, as part of a broader attempt at a 'coup' - especially once proof of him killing off Santiago. Rather than a direct war, getting ships to defect or at least refuse to attack civilian targets was the goal. Quite a few of B5's actions were in support of EA ships against the psicorps/shadow conspiracy (say when they went in and took out the psy corps ambush of EA forces).
Likewise, rather than a direct attack on mars, the rangers provided a distraction allowing the local resistance to take strategic locations on mars.
On the final assault on earth, while there were heavy losses, the final victory wasn't because Sheridan had an overwhelming victory (heck, he almost died again), but because Clark went nuts and tried to destroy Earth. Arguably, he even surrendered to the EA, and got saved by the new Interstellar Alliance.
Sheridan never wanted to fight against the EA - Both B5's independence and the actual war were reactions to abuses of power but arguably, without the white stars, and Earth and Martian resistance, Sheridan had no hope of winning an unconventional war. Without help from alien races - and Clerk spun Sheridan as someone who was influenced heavily by the minbari, a direct, toe to toe war would have ended badly.