Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to Upload the Client File To The Server

 
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.
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jakarta Commons FileUpload
 
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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 ]
 
Marshal
Posts: 67413
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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


 
Rancher
Posts: 43016
76
  • 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?
 
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
 
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...
 
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?
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic