You still need to create a servlet context for the file to be placed under. You can do this by creating a WAR directory in the server/default/deploy directory of JBoss or whatever instance you are running - assuming you are running a 3.0.x or higher JBoss.
So you might create a directory called MyApp.war. JBoss searches for directories or files with a .war extension and interprets these as deployment packages for web applications. The web application context is the name of the WAR. If you place your text file in the new subdirectory - say MyFile.txt, you would access it locally by http://localhost:8080/MyApp/MyFile.txt.
For certain content types, you may need to create a WEB-INF subdirectory in your WAR directory to define your web.xml. I don't think it is required for static content and if you do not want to override the context name. Read up elsewhere on building and deploying WARs - the JBoss forums are not geared up to provide tutorials on web application development.
Hope this gets you a start.