| Author |
how to get path of web application in tomcat?
|
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
hi, how do i get the path of web application folder in java ? i want my system auto detect the current running web application folder , how do i code that ? i have try which result me "path :c:\web-inf " how do i make it to get c:\myrunningweb\web-inf ? note: assume c:\myrunningweb is the current running web folder ..thank you !!
|
 |
Malhar Barai
Author
Ranch Hand
Joined: Aug 17, 2001
Posts: 399
|
|
You can use the getServletContext().getRealPath("/") method...the you will get the real path till your context. HTH MB
|
Malhar Barai
SOA & Java Book
|
 |
 |
|
|
subject: how to get path of web application in tomcat?
|
|
|