• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Yahoo media player in JSP not working

 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Trying to embed yahoo media player into JSP.

Working fine in.html ,I can see a play button next to the mp3 song, yahoo player opens upon playing.

It does not do the same in .jsp, it opens up Qucik time player . Don't know how to proceed.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compare the HTML of the page that works with the generated HTML of the JSP page that does not. See what the differences are that may cause different behavior.
 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both jsp generated and html file are same. For testing purposes i renamed the .html file to .jsp,deployed; it still does not work in jsp.

Tx.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Impossible. If two identical HTML pages are sent to a browser they will act the same. The fact that one was generated by a JSP is moot. There is a difference that you;re not detecting.
 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test.html


jsp 'created one

From the browser view source of http://localhost:8080/iMusic/Test.jsp



I see all of them are same.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aside: why on earth are you using strings with HTML inside them in a JSP? The whole purpose of a JSP is so that you can place HTML markup as template text!
 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test.jsp


Test_jsp.java


The above one is compiled java code of jsp.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, OK. Whew! I thought you were writing your code that way! (Some do!)

In any case -- take the .html file, rename it to .jsp. That way you know that the exact same HTML will be sent to the browser. Do they act the same, or differently?
 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I renamed the .html to .jsp and used the same

They are not acting the same..there is the problem...I can see play button to play the music but in jsp it is downloading the file to local system.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, that's rather inexplicable. The only explanation could be (and this seems highly unlikely) that the Yahoo! library is looking at the URL (which is the only thing that is different) and doing something different based upon that.

At this point, you'll need to post an SSCE so that we can recreate the issue ourselves.

 
chandra chatterjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I changed the server name from localhost to my system , it is able to load the plugin. Strange but works fine now!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic