Forums Register Login

File upload with struts

+Pie Number of slices to send: Send
Hai,


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

MyProjectRoot
--WebContent
----jsps
----images
----UploadDirectory
----WEB-INF
----...
--JavaSource
----...


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 ]
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 974 times.
Similar Threads
package javax.ejb does not exist
jboss log stucks while deploying
write jboss service to perform a task at startup.
Uploading file
JSPs don't see EJBs
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:25:24.