0 Replies Latest reply on Aug 17, 2006 6:55 PM by pander

    JBOSS & MP3 Streaming

    pander

      Hi,

      Has anyone out there come across this problem before? I have a secure site running on port 8443 which I am trying to stream MP3 audio from but Windows Media Player continually tells me that a network problem occurred and that I should check my proxy settings. The proxy settings are standard from installation. I have a servlet to byte stream the data from the site, the code is as follows:

      DataInputStream dis = new DataInputStream(new FileInputStream(Constants.voicemailStore+"/"+msg));
      
       byte[] buffer = {};
       dis.read(buffer);
       dis.close();
      
       response.setContentType("audio/mpeg");
       response.setContentLength(buffer.length);
      
       ServletOutputStream out = response.getOutputStream();
       out.write(buffer);
       out.flush();
       out.close();
      


      I also have another secure site running on standard secure port 443. This site runs Apache 2 and has a cgi script in place with code logically identical to the code above. Links clicked on this site work!!! Windows Media Player has no issues whatsoever with the stream.

      What is going on? Why won't my servlet method work? I have scoured the internet trying to find answers to this but have not managed to find anything. Clutching at straws now I finally thought I'd better check here to see if anyone has had similar problems.

      Could it be down to the port number i'm using?
      Could it be a difference with JBOSS and Apache?

      Please Help !!

      Regards,
      Paul.