aspose file tools*
The moose likes Tomcat and the fly likes store a file in tomcat server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

store a file in tomcat server

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

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 ?


Thanks,
Sherif
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12805
    
    5
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

Joined: Mar 05, 2007
Posts: 483

nothing but i need all the application fully web based ..
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12805
    
    5
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

Joined: Mar 05, 2007
Posts: 483

ya here it is :

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

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

Joined: Mar 22, 2000
Posts: 12805
    
    5
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

Joined: Mar 05, 2007
Posts: 483

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

Joined: Jan 10, 2002
Posts: 61426
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: store a file in tomcat server