Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Upload the Client File To The Server

 
anilellendula kumar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai!

Pls Help me on how to upload a file to the server using jsp


here one jsp ask u to browse the file after browsing user will submit, So After Click on Submit Button that jsp file has to upload in to the server, can any one help on this to upload a file to the server using jsp.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jakarta Commons FileUpload
 
Tien-Chih Wang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can also try Oreilly's package.(com.oreilly.servlet) cos.jar

Sincerely,

Tien-Chih Wang
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is probably in the top 3 most frequestly asked questions, I've added it to the Jsp and Servlet FAQ pages.

http://faq.javaranch.com/view?JspFaq
[ October 26, 2005: Message edited by: Ben Souther ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben!
 
anilellendula kumar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How Can I Upload a Client File to a Server Folder Using jsp

here i have written below code in one jsp

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ReadFile</title>
</head>
<body>
<form name="index" action="ReadFromXls.jsp" method="Get" >
<br><FONT SIZE=2 FACE="Arial">Enter The Pathe Of The Xls File:     </font>    <td bgcolor="eb922c" align="center" width="10%" class="whitelnk"><input type="file" name="path" value=""></td></br>
<tr> <input type="submit" name="Submit" value="Upload" /></tr>
</form>

</body>
</html>


After Click On upload button it has to call ReadFormXls.jsp in this jsp i need to write code to store file in server.


How to upload a file from client machine file in to server folder.pls help on this


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After having looked at the documentation of one or both of the packages recommended to you, what specific question do you have about using them?
 
sureshreddy puli
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there are number of predefined jrs available in web. Please search and get those components and use directly. Here i am sending the url. Please go through it.

http://www.javazoom.net/jzservlets/uploadbean/documentation/installation.html#war
 
Arun Kumar S
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI there,

Uploading files works fine.. Can any one please post info on retrieving the uploaded files...
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arun Kumar S:
Uploading files works fine.. Can any one please post info on retrieving the uploaded files...


Hey its more then simple. Just make a HTML link to that file.
Are you getting me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic