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. Advertisements

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. dotnetprogram
    Replies:
    1
    Views:
    823
    Joey Powell
    Dec 27, 2003
  2. Benny Ng
    Replies:
    9
    Views:
    10,949
    Benny Ng
    Oct 13, 2005
  3. could ildg
    Replies:
    0
    Views:
    663
    could ildg
    Jul 1, 2005
  4. MattC
    Replies:
    1
    Views:
    599
    Manish Pandit
    Feb 8, 2007
  5. hector
    Replies:
    5
    Views:
    640
    CBFalconer
    Dec 5, 2006
  6. Jani Tiainen
    Replies:
    3
    Views:
    1,183
    Jani Tiainen
    Aug 27, 2007
  7. LprzemekL
    Replies:
    0
    Views:
    742
    LprzemekL
    Apr 10, 2008
  8. Norah Jones
    Replies:
    0
    Views:
    459
    Norah Jones
    Apr 7, 2014
Loading...