NoNaMe
NoNaMe

Reputation: 6222

How to find the path of webapps directory using java

Is there some way to find the path of tomcat's webapps directory using java, as we use System.getProperties("...") to get user.dir etc

thanks in advance.

Upvotes: 8

Views: 17237

Answers (1)

Dark Knight
Dark Knight

Reputation: 8337

You can use System.getProperty( "catalina.base" ) for same. And add "/webapps" to path.

Upvotes: 18

Related Questions