Re: JBoss - how to write files into the root context directory from the web application

Discussion in 'Java' started by Tobias Schierge, Apr 15, 2006.

  1. Hi,

    > I use JBoss 2.4.7 (soon upgrading to 4). My root web application
    > context is deployed outside of a war file. I want my web application to
    > be able to write new files into this directory tree. So, I need to
    > obtain a java.io.File object that points to the root of my web
    > application. However, this path varies from server to server. Is there
    > a way I can get this path from the JBoss API somehow?


    try ServletContext's getRealPath method but before rethink your idea and
    evaluate if it is really a good one..

    Regards,

    Tobias
    Tobias Schierge, Apr 15, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattC
    Replies:
    1
    Views:
    489
    Manish Pandit
    Feb 8, 2007
  2. hector
    Replies:
    5
    Views:
    398
    CBFalconer
    Dec 5, 2006
  3. Jani Tiainen
    Replies:
    3
    Views:
    1,003
    Jani Tiainen
    Aug 27, 2007
  4. LprzemekL
    Replies:
    0
    Views:
    514
    LprzemekL
    Apr 10, 2008
  5. Norah Jones
    Replies:
    0
    Views:
    67
    Norah Jones
    Apr 7, 2014
Loading...

Share This Page