jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Struts2 Play audio file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 Play audio file" Watch "Struts2 Play audio file" New topic

Struts2 Play audio file

Dev Anand
Ranch Hand

Joined: Aug 30, 2009
Posts: 41
I have written following code to play audio file. It is neither showing any error message nor playing the mp3 song.

I'm calling the above class from jsp file as below :

can anybody help me why its not getting played?

Thank you.

Dev Anand. P
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Struts and JSP code run on the server, so I'm not sure your code even does what you want it to do (not to mention using Java code in JSP's is a Bad Idea).
If you want to play a file for the user through the browser, you should probably look at the java.applet.Applet play() method.

[How To Ask Questions On JavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: Struts2 Play audio file
It's not a secret anymore!