my dog learned polymorphism*
The moose likes JSP and the fly likes Yahoo media player in JSP not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Yahoo media player in JSP not working" Watch "Yahoo media player in JSP not working" New topic
Author

Yahoo media player in JSP not working

chandra chatterjee
Greenhorn

Joined: May 13, 2009
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60780
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chandra chatterjee
Greenhorn

Joined: May 13, 2009
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60780
    
  65

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

Joined: May 13, 2009
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60780
    
  65

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

Joined: May 13, 2009
Posts: 18
Test.jsp


Test_jsp.java


The above one is compiled java code of jsp.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

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

Joined: May 13, 2009
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60780
    
  65

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

Joined: May 13, 2009
Posts: 18
I changed the server name from localhost to my system , it is able to load the plugin. Strange but works fine now!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Yahoo media player in JSP not working
 
Similar Threads
How to stream live and offline videos using java client and server?
Getting resource from jarfile
Play a MP3 file.
MP3 Player
play a wmv file in jsp