This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 9136

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]
Have you checked out Aspose?
subject: Struts2 Play audio file
It's not a secret anymore!