• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Uploading file

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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???
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic