video uploading using jsp
this is the code i hv written for uploading..but the value in dropdown list is not captured..can any 1 tell the reason
html file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<form action="facultyvideoupload.jsp" enctype="multipart/form-data" method="POST">
<input type="file" name="file2"><br><br>
<select name="select" id="select">
<option value="c">C</option>
<option value="c++">C++</option>
<option value="java">Java</option>
<option value="os">os</option>
<option value="cad/cam">Cad/Cam</option>
<option value="vlsi">Vlsi</option>
</select>
<input type="Submit" value="Upload File"><br>
</form></center>
</body>
</html>
facultyvideouload.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*" %>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="org.apache.commons.fileupload.DiskFileUpload"%>
<%@page import="java.util.List"%>
<%@page import="org.apache.commons.fileupload.FileItem"%>
<%@page import="java.io.File"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>uploading page</title>
</head>
<body>
<%!
private String uname;
private String password;
private String email;
private String video;
FileItem fitem3;
PreparedStatement pst;
String query;
%>
<%
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","system");
//response.setContentType("multipart/form-data");
DiskFileUpload dfupload = new DiskFileUpload();
List listItems = dfupload.parseRequest(request);
System.out.println("xcxxxxxxxxxxxxxxxxx"+listItems.size());
email = (String)session.getAttribute("user");
System.out.println("email :"+email);
password = (String)session.getAttribute("password");
System.out.println("password :"+password);
String select=request.getParameter("select");
System.out.println("select :"+select);
fitem3 = (FileItem)listItems.get(0);
String abname = fitem3.getName();
System.out.println(abname);
int index = abname.lastIndexOf(File.separator);
video = abname.substring(index+1);
query = "insert into video(emailid,password,video,subject) values(?,?,?,?)";
pst = con.prepareStatement(query);
pst.setString(1,email);
pst.setString(2,password);
pst.setString(3,video);
pst.setString(4,select);
int i = pst.executeUpdate();
if(i>0){
String savepath = getServletContext().getRealPath("/");
StringBuilder sb = new StringBuilder(savepath);
for(int c=0; i<sb.length(); i++){
if(sb.charAt(c)==File.separatorChar)
sb.insert(c++,'\\');
}
File outfile = new File(sb+"videos\\"+video);
System.out.println("pathhhhhhhhhhhhhh: "+outfile);
fitem3.write(outfile);
response.sendRedirect("home2.html");
}
else{
//request.getRequestDispatcher("home2.html").forward(request,response);
}
pst.close();
}
catch(Exception e)
{
out.println("Error:"+e);
}
%>
</body>
</html>
View Answers
Related Tutorials/Questions & Answers:
video uploading using jspvideo uploading using jsp how to upload a videos in web page
using jsp
Hi,
You can upload your
video with the help of
JSP file upload code. Once file is upload you can play
using any
video player.
Get the code
video uploading using jspvideo uploading using jsp this is the code i hv written for
uploading..but the value in dropdown list is not captured..can any 1 tell the reason...; charset=ISO-8859-1">
<title>
uploading page</title>
</head>
Advertisements
Uploading image using jspUploading image
using jsp how to upload image
using jsp. Already i... that image file ...
I want know that solution
using by u...
Thanks,
P.S.N.
Here is a
jsp code that upload image and display it on the browser.
1
file uploading using jspfile
uploading using jsp below file
uploading code has one error "toBytes[i-start]=fromBytes; " incompatable type error please help me how to solve... in
uploading ");
}
%>
Hi Friend,
Try the following code:
1
Uploading Multiple Files Using Jsp Uploading Multiple Files
Using Jsp
... to understand how you can upload multiple files by
using the
Jsp.
We should avoid... by
using Jsp and how they will get stored on the particular memory area. To get
Uploading a single file by using JSpUploading a single file by
using JSp u have said about submit button..but in program u have not used submit button..and where file will be stored..where should we specify the output folder name..
Visit Here
Uploading a single file by using JSpUploading a single file by
using JSp u have said about submit button..but in program u have not used submit button..and where file will be stored..where should we specify the output folder name..
1)page.jsp:
<
uploading a file at another system in lan using jspuploading a file at another system in lan
using jsp Thanks for the code at "http://www.roseindia.net/
jsp/fileupload/Sinleupload.xhtml.shtml". It is working when i gave address of the local system to savefile But if i want
how to play video in website using jsp how to play
video in website
using jsp please help me friend how to play a
video in webiste by
using jsp which playres are used and how to play
video please give me code
File uploading - JSP-ServletFile uploading i am
using file
uploading code for multiple file and aslo for single file but i am getting problem that No such file found....
http://www.roseindia.net/
jsp/file_upload/Sinle_upload.xhtml.shtml
Uploading a file using UploadBeanUploading a file
using UploadBean Dear sir,
In my project i have to upload the file and use the same file for getting a values from that uploaded .xls file.I used UploadBean for
uploading .For the first time when i
Uploading Single File by Using JSP Uploading Single File by
Using JSP
... to understand how you can upload a file by
using the
Jsp.
As
Jsp is mainly used... by
using
Jsp and how it will get stored on a particular memory area. To get
Uploading Single File by Using JSP Uploading Single File by
Using JSP
... to understand how you can upload a file by
using the
Jsp.
As
Jsp is mainly used... by
using
Jsp and how it will get stored on a particular memory area. To get
excel uploading in jspexcel
uploading in jsp could you provide the source code for:
1)have to upload an empty excel sheet at client side i.e if client clicks an excel... given and printing them in a
jsp page.
could you please provide the code in spring
Uploading an image - JSP-ServletUploading an image I am doing a
jsp project. In this
uploading an image is a part. For that i had done a coding for
uploading... and
uploading is done by different
jsp coding. I don't know how to code for file size
Uploading Multiple Files Using Jsp Uploading Multiple Files
Using Jsp
... to understand how you can upload multiple files by
using the
Jsp.
We should avoid... by
using Jsp and how they will get stored on the particular memory area. To get
Uploading tha file - JSP-ServletUploading tha file hi,Sir.
this is siddaiah.
please give me response for the follwing questions.
1.how to upload file into oracle database
using JSP?
2.How to upload photo into oracle database
using JSP?
Regards
upload video using phpupload
video using php How to upload a
video on MYSQL Server
using PHP Code..? Can any one provide me an example
video streaming - JSP-Servletvideo streaming how to do
video streaming in
JSP ?
the project is all about the VIRTUAL CLASS ROOM.
i hv to show a
video of the live class to my client computers.So i need
video streming code for that.
plz help me
FILE UPLOADING - JSP-ServletFILE UPLOADING Hi ,
I want Simple program for file upload
using html and servlet
plese help me hi friend pls try this code
**********
try{
String type="";
String boundary="";
String sz
Uploading a software and displaying it on the jsp pageUploading a software and displaying it on the
jsp page I have a Downloads page in my website, I want it to display the name of softwares as soon as it is uploaded in the backend by the administrator. And the admin may be a non
Video streaming using javaVideo streaming
using java I want to create a website based on
video... have to stream the
video in the server side and send that to the client side.(Like youtube i.e no
video url has to be used in client side).
I didn't have any
Multiple file Uploading - JSP-ServletMultiple file
Uploading Hello everyone
I am
using jsp and my IDE... files
using the same code provided on the site and i am getting hell lot of errors... that is raised:
16:37:14,612 ERROR [[
jsp]] Servlet.service
Uploading multiple files in JSP - JSP-ServletUploading multiple files in JSP Hi,
I have this code in
JSP for
Uploading multiple files :
Samples : Simple Upload.../
jsp/file_upload/uploadingMultipleFiles.shtml
Hope that it will be helpful
Uploading an image into the table - JSP-ServletUploading an image into the table how to upload an image... a connection by
using Connection interface
Connection connection = null;
/* Create...();
/* Create a connection by
using getConnection() method that takes
uploading a file - JSP-Interview Questionsuploading a file
uploading a file and storing in database
using clog and blog?
java code in swing for that i want Hi Friend,
Try the following code:
import java.io.*;
import java.sql.*;
import java.util.
JSP Project: implementing video chatting in JSPJSP Project: implementing
video chatting in JSP Hi!!! I am developing a chatting application in
JSP and Servlet. I want to implement
video chatting facility on my website. How can I do this task. Please help at the earliest
image uploading perminssion in server - JSP-Servletimage
uploading perminssion in server Dear All,
I am facing some problem image
uploading in server that i working fine in my system, OS Ubuntu...)
com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:89)
org.apache.jsp.jsp.BSAdminProductsCreate_
jsp Need help in image uploading - JSP-ServletNeed help in image uploading hii,
i have one doubt in
uploading an image in
jsp. I want to display image from DB to my
jsp page. For that i... a folder named images in server but cant upload.Is any extra code need for
uploading image uploading perminssion in server - JSP-Servletimage
uploading perminssion in server thanks dear,
but i am working in Linux Ubuntu, how can i set the path in server.
my problem is i am not able to access the folders wherever we are
uploading the files, we are not able
Thumbnail creator for uploaded video files in jspThumbnail creator for uploaded
video files in jsp i am working in
jsp..i need a thumbnail creator for the
video that will be uploaded by the user of my website(like youtube)...Once the
video has been uploaded,i wanna display
how to record qvga video using j2me - Applethow to record qvga
video using j2me hello
if it is possible
how i can record qvga
video usin j2me?
Hi Friend,
Please visit the following links:
http://www.roseindia.net/j2me/video-midlet.shtml
http
tree using jsp codetree
using jsp code i want to draw a tree structure of a family hierarchy
using jsp code
Pass hidden veritable while uploading file - JSP-ServletPass hidden veritable while
uploading file Hi All,
Is there any... are
uploading file, all the parameter other then file upload are null. Is it write?
Please guide me in this issue.
Again, in simple word my
Q is "How to pass hidden