Hi Guys, Here I
explained how to upload a file into your specify folder using JSP. I wrote this
program only for the beginners who are all interested to upload their file in
folder or Database.
Note : Before coding
download the file COS.JAR
Index.html
<form
ENCTYPE="multipart/form-data" ACTION="upload.jsp"
METHOD=post>
<center>
<input type="text"
name="t1">
<input type="file"
name="file">
</center>
<input type="submit" value="submit">
Upload.jsp
<%@page contentType="text/html"
pageEncoding="UTF-8"
import="com.oreilly.servlet.MultipartRequest"%>
<!DOCTYPE html>
<html>
<head>
<title>JSP Page</title>
</head>
<body>
<%
String
filename=m.getFilesystemName("file");
out.println(filename);
%>
</body>
</html>
No comments:
Post a Comment