• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

File upload and data retrieval  RSS feed

 
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.
 
Marshal
Posts: 67164
169
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.
 
Rancher
Posts: 3757
40
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!