0

I am developing a web project and after mvn build proper war file is created. In thisproject I am creating an APN service by giveing the full certification path which is pointing in local directory like "file:c:certification.p12"

ApnsService service = APNS.newService().withReconnectPolicy(new ApnReconnectPolicy()).withConnectTimeout(apnSockectTimeout).withCert(certificatePath, certificatePassword).

I would like to know if I can put certification.p12 file in war file and access it in classpath decription

Ahmet Karakaya
  • 9,899
  • 23
  • 86
  • 141

1 Answers1

1

Yes,

It's recommended to use context.getRealPath or context.getRessource method to not care about where the application is deployed. Don't forget to hide your file in the WEB-INF , if not it can be downloaded as a simple file.

See : File path to resource in our war/WEB-INF folder?

Yours

Community
  • 1
  • 1
hgregoire
  • 111
  • 1
  • 3