I installed tomcat. When I clicked on startup.bat I dos window flashed on/off on my screen. I tried to load the url http://localhost:8080/ and a screen came up that said firefox was unable to connect to the server at localhost:8080. I have no idea what to do to solve the problem
The DOS window should remain up, and you should see the Tomcat messages list there. The window represents the running server; if it's not there, there'll be no server to connect to from Firefox.
There is probably something amiss with your Java installation. I suggest that you open a DOS window (Start --> Run... --> "cmd <enter>", change directory to where the startup.bat is located, and try running it directly from there. You should then be able to read any error message provided. If you're still not sure what the problem is, post the error message here.