File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to play mp3 file from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to play mp3 file from a servlet" Watch "How to play mp3 file from a servlet" New topic
Author

How to play mp3 file from a servlet

sandeep kumar Jakkaraju
Greenhorn

Joined: Sep 10, 2006
Posts: 5
Hi All

How to play a mp3 file from a servlet ??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
You can use either the JMF API to play MP3 files (which is no longer developed, as far as I can tell), or QuickTime (which doesn't support Unix).

But if you're playing those on the server, who's going to hear them?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11525
    
100

It has certain possibilities assuming you know who is going to be in the server room and when. You could play theme music, or special sound bites.



Regards, Andrew
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
You could also play some warning sound when the server gets short of memory, or the load gets very high...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Maybe somebody could write a log4j MP3 appender for this.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[Ilja]: You could also play some warning sound when the server gets short of memory, or the load gets very high...

[link]

And perhaps you can also find a use for this somewhere:

[link]


"I'm not back." - Bill Harding, Twister
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jim Yingst:

[link]


We are already using that as the "build failed" sound for Cruise Control. Together with a flashing red light, of course.

The "stupid" quote is neat, but we've found that voice output is harder to identify than pure sound effects - especially in a room full of pair programming pairs...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to play mp3 file from a servlet