Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- video player does show up but it doesnt play video.
- I did upload 1mb video mp4 format in mysql through blob
- anyone know what's the problem here?
- [code]<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <%@ page import="java.sql.*" %>
- <% Class.forName("com.mysql.jdbc.Driver"); %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Insert title here</title>
- </head>
- <FORM ACTION="playdb.jsp" METHOD="POST">
- <BR>
- <INPUT TYPE="TEXT" NAME="username">
- <BR>
- <INPUT TYPE="SUBMIT" value="Submit">
- <%
- Connection c = DriverManager.getConnection("jdbc:mysql://localhost/test","root","5845#Mankind");
- Statement statement = c.createStatement();
- String id = request.getParameter("username");
- ResultSet resultset =
- statement.executeQuery("select video from applicant where username = '"+id+"'") ;
- if(!resultset.next()) {
- } else {
- %>
- <body><div class="media">
- <video width="320" height="240" controls>
- <source src="<%=resultset.getString("video")%>" type="video/mp4">
- <source src="movie.ogg" type="video/ogg">
- </video>
- </div>
- </div>
- </body>
- <%
- }
- %>
- </FORM>
- </html>
- [/code]
Add Comment
Please, Sign In to add comment