Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 Play audio file

 
Dev Anand
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.

Regards
Dev Anand. P
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic