• Post Reply Bookmark Topic Watch Topic
  • New Topic

File upload with struts  RSS feed

Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using struts for web application development. In my application, I want to upload text files selected from one client location to a server directory. This server directory can be accessed only through the application (not a shared folder). I have created a "UploadDirectory" directory at /MyProjectRoot/WebContent/ folder.

Now directory structure for my application is


I am deploying the application in JBoss 4.0 application server. My server has got C:\Program Files\jboss-4.0.5.GA\server\default\deploy\MyProjectRoot.war as the deployed application. I wrote upload code as from http://www.roseindia.net/struts/strutsfileuploadandsave.shtml . After the execution I could find my uploaded files at a C:\Program Files\jboss-4.0.5.GA\server\default\tmp\deploy\tmp26755MyProjectRoot. I think this not a permanent thing. I would like to store these files permanently at a server location. And the clients should be able to download these files any time they want.

Please help. I could not make out how this tmp directory comes in between. I don't understand what is happening over here. Any help will be appreciated. Thanks.
[ November 26, 2008: Message edited by: roshni ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!