Pro JSPAdvanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Hi,
I have searched a lot and at last found this forum,and i think i can find my solutions here......
Q->I have stored all my songs in my oracle database my db table is like this...CREATE TABLE SONGS_TABLE(title varchar2(20),songs BLOB); .
Creating an admin page in jsp (insertSongs.jsp) i have inserted my data into the songs_table .And then in another jsp page (i.e songsList.jsp)
i have query for displaying only songs list from db code below............................................. ......................
String QueryString = "SELECT title from mysong";
rs = statement.executeQuery(QueryString);
%>
<%
while (rs.next()) {
String arr[]= new String [rs.getString("title").split("\\,").length];
int i;
for(i=0;i<arr.length;i++)
{
arr = rs.getString("title").split("\\,");
Now My Problem is that how to play that songs or a list of songs on clicking on it to a swf player ie in my Player.jsp page.............................................. .....................................
String QueryString = "SELECT * from mysong where title='"+request.getParameter("sid")+"'";
rs = statement.executeQuery(QueryString);
%>
<%
while (rs.next()) {
byte[] bytearray = new byte[10240];
int size=0;
My exact problem is that how to feed the songs or songs list to a swf player from database directly?
have i to create any dynamic .xml file or else for songs list to a swf player? if so how?
You can try by writing a servlet/jsp which takes song title as parameter and reads the data from the db and writes to response object. Use this servlet's URL in 'SRC' attribute of the swf player 'object/embed' tag.
Which means 'Player.jsp' in the above code has to be splitted to two jsps.
Hope it works :-)
Hi
Rakesh Thanks for ur frequent response,I am trying as u said,and i think it shold be work in this way but i dnt know when i am running this program as u write code above by simple modifying it dont work.The player.jsp comes a swf player with nothing playing only player but in the url it showing request which i send...