Bookmark Topic Watch Topic
  • New Topic

store a file in tomcat server

 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi pals,

i got a servlet is going to connect to a DB then do some queries then write the result in excel file on the local hard disk , what i wanna instead writing the file on the local hard disk i wanna to store it on the tomcat in a specific path so it can be downloaded ,

Any suggestions ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
What is preventing you from accomplishing this with standard Java?

Kindly read this FAQ page.

Punctuation and logical sentence structure are your friends when communicating a question. Programmers who can't write clear documentation don't get hired.

Bill
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
nothing but i need all the application fully web based ..
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
The standard Java library and the servlet API are all you need.

What have you tried?

Where are you stuck?

Do you have code that works outside the servlet environment?

Bill
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
ya here it is :

 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
i tried to get the absolute path for the file i created but i found it like this : "c:\program files\eclipse\mfile.xls", so this will not work on the web.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
I just noticed you are posting the same question in the servlets forum. Posting duplicates is considered impolite since it wastes our time.

Bill
 
Sherif Shehab
Ranch Hand
Posts: 485
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
ya because i thought it may fit the Servlet forum , rather tomcat forum because the answer on the servlet forum will be generic not specified specific server so it will be more useful for all posters ..
what do you think close the thread in tomcat and keep the another one?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Corss-posting is consider very very rude. If you feel you have posted in the wrong forum, ask a moderator to move it for you. Do not start a new post yourself. I'll close this one, and were I you, I'd profusely apologize to William.
 
    Bookmark Topic Watch Topic
  • New Topic