This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to retrieve the webapp directory without using ServletContex  RSS feed

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
i need to find out dynamically in which webapp directory my webapp running but , i can't use ServletContex for that (dont ask ...)
is there any way to find out ?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.

Furthermore, even with the methods provided by the ServletContext object, it is not always possible to find the directory dynamically because web applications are not required to be run from a directory.

You said not to ask so I won't but if you can tell us what it is that you're trying to accomplish maybe someone can suggest an alternate approach.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!