• Post Reply Bookmark Topic Watch Topic
  • New Topic

File upload and data retrieval  RSS feed

 
Prasant Jillella
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys i am doing a web development projects, i have a small doubt regarding it. My task is to upload a CSV file in a form and then redirect it to a jsp page where i take this file as input and then extract the data and store it in oracle database. These thigs are to be done in my local system. I am coding using eclipse.
can any one please help tell how to do this, had been trying this for a long time. so any help would be highly appreciated.

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66260
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Prasant Jillella wrote: and then redirect it to a jsp page where i take this file as input and then extract the data and store it in oracle database.

No. You don't want to do that! A JSP is not the place to do any processing -- JSPs should only be used for generating views. You want to send the data to a Java class for processing, not a JSP.

can any one please help tell how to do this, had been trying this for a long time. so any help would be highly appreciated.

Please move your code out of a JSP and into a Java class, and then post back with any problems you are having. Be sure to post your code and UseCodeTags.
 
Dave Tolls
Ranch Foreman
Posts: 3001
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Bear says, you upload it to a servlet, and the servlet calls another Java class that does the processing.
The advantage of this is you can test all the data extraction code without having to run a server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!