FedericoAlvarez
FedericoAlvarez

Reputation: 165

Migration from Tomcat7 to Jetty (Catalina.base)

I'm migrating from Tomcat7 to Jetty(9.3). And in some part in my code I have this:

final List<File> files = FileFinder.getFilesMatching(System.getProperty("catalina.base"), "^(special-prefix).*$");

So I want to replace the string "catalina.base" for something similar in Jetty.

Thanks

Upvotes: 0

Views: 1465

Answers (1)

Federico Sierra
Federico Sierra

Reputation: 5208

In Jetty you have the following environment variables, similar to tomcat:

Jetty Base
Also known as the ${jetty.base} property.
This is the location for your configurations and customizations to the Jetty distribution.

Jetty Home
Also known as the ${jetty.home} property.
This is the location for the Jetty distribution binaries, default XML IoC configurations, and default module definitions.

Eg.

final List<File> files = FileFinder.getFilesMatching(System.getProperty("jetty.base"), "^(special-prefix).*$")

See also: Managing Jetty Base and Jetty Home

Upvotes: 1

Related Questions