aspose file tools*
The moose likes JBoss/WildFly and the fly likes Uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Uploading file" Watch "Uploading file" New topic
Author

Uploading file

Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
Hi Friends,

I am working on an application that uploads files from the client (browser) to the server (JBoss). It seems to be the uploading works, but I am wondering where the uploaded file is saved?

When I develop the application, the upload dir is inside the the production dir.

If I deploy on Tomcat, I can really go to the upload dir and see the files created there.

But when I deploy on JBoss, I deploy a war/jar/ear file. So while uploading the files are not created inside that war file. So where physically are they???


We must know, we will know. -- David Hilbert
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

So where physically are they???


Don't you specify, in your code, the path where the file has to be uploaded? Quickest way to figure out where the file got created, is to do a File Search on the server, by the name of the file you uploaded.
[ July 19, 2007: Message edited by: Jaikiran Pai ]

[My Blog] [JavaRanch Journal]
Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
Jaikiran Pai said:

Don't you specify, in your code, the path where the file has to be uploaded?


I did. Read what I said:

When I develop the application, the upload dir is inside the the production dir


Let's say the upload dir is above the WEB-INF dir. If I deploy on tomcat, I do not pack the whole thing into a war. So the upload dir remains a dir that I can simply navigate to and see it getting filled.
But if I deploy on JBoss, I pack the whole app into a war. Inside this war there is also packed that upload dir. But it is not getting filled. I unpacked it after the uploading and saw it's just empty. However the upload was successful (but to some unknown destination).

Jaikiran Pai said:

Quickest way to figure out where the file got created, is to do a File Search on the server, by the name of the file you uploaded.


Me:

I did try to do it, but got no results, that's why I posted here. The link to the uploaded file is http://localhost/My_War_file/upload_dir/uploaded_file.exe

I was able to download back this file from this link!

However, this is not a real physical location. And as I said, when I unpacked the app war file, the upload dir was empty.

What is the JBoss policy about storing an uploaded file in a case the upload dir is jared? Where are the uploaded files supposed to go?

Thanks.
[ July 19, 2007: Message edited by: Joseph Sweet ]
Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
I found it!

It was in the

C:\jboss\jboss-4.0.5.GA\server\default\tmp\deploy\tmp21139my_app-exp.war\upload_dir

I think I should upload to some external dir on my computer, otherwise I lose the old uploaded files when I deploy a new version of my app.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uploading file