View Full Version : streaming mp3s in tomcat problem

blinkity blink
02-14-2003, 09:01 PM
Hi, I have designed an mp3 player - basically there is a list box that gets a set of labels and values from a servlet via xml. The values are the names of mp3 files on a folder on the server. There is a button to play whatever mp3 is selected in the listbox and a function to play. I have it working fine on locally, but when I try to run it on the remote server the songs do not play. I have tried everything. I tried using an http: url, hardcoding the path, I even wrote a servlet that returns an mp3. It plays on explorer, but flash cannot access the mp3 or start playing it for some reason. It seems to be a tomcat problem. Does anyone know anything about this, or does anyone have any experience usint flash on an instance of tomcat?


Blinkity Blink

02-14-2003, 10:54 PM
Are you running tomcat on linux? Or you running a sandbox on a windows machine?

If it's linux, check the file permissions.

blinkity blink
02-15-2003, 07:05 PM
No, it is not a linux machine, it is a compaq 500Mhz server running windows 2000 server and IIOS. I am also running it on a windows machine with a sandbox (if that means stand alone tomcat like I think that it does), and it works on there if I hard code the path to the folder containing the mp3. It will not work using a http url either way. On the server the movie is able to access a servlet and recieve xml, but I wrote a servlet that responds with an mp3, and the flash movie is not able to play it. It seems like it is having trouble recieving or reading binary data from a file. I am going crazy - I am in programming hell.

Thanks for your input.:confused:

02-16-2003, 03:31 AM
I'm as lost as you are. Could it be a mime type setting on your server that's preventing it from playing? What about using m3u locator files?

blinkity blink
02-16-2003, 03:54 AM
I am going to look into mime type settings on the server - that could be a possibility. I am not sure what m3u locator files are though.

I really appreciate you trying to help me out. This is a rather unusual problem and I have not had any luck in finding info, except for your replies.

02-16-2003, 04:21 AM
An m3u file is just a text file with a link to the mp3 file, like this...



Sometimes this can help 'stream' mp3 files.

I did a quick search and found this article which should explain it better:

Usually (by default), mp3 files download to a computer before they can be played, that could be the problem.