1

I'm writing a service for Axis2 + Tomcat7.0 with Java for the application. I've chosen to write any information to xml file, the problem is where is the root of the service/application server?

I read the other question but isn't response good.

How can I get an absolute path to the writable directory by the service?

Community
  • 1
  • 1
skinflint
  • 381
  • 3
  • 5

1 Answers1

0

I would set an environment variable and then read the value of it by using System.getProperty().

I think the default file writing location is wherever you are when you start the server, at least that's what I found with JBoss one time. The easiest thing is to either set an environment variable in a server property file, or create a property file for your service to use to retrieve the location. I've done it both ways with JBoss in windows and unix.

Logan
  • 2,369
  • 19
  • 20