How can I have my application made in Play! 2.0.4 (latest “production ready” package) exported to run on either Apache 2.2 or Tomcat 6.0.18 at a path like e.g. tomcatserver:8080/myApp/?
The application always runs at / under localhost:9000 on either Dev or Prod environment.
- I tried the
warcommand but it seems unavailable for this version. - Tried
stagecommand, but it failed since it needschmodand I’m using Windows XP (although my Apache is in a FreeBSD machine and Tomcat is in a Linux one). - Then I tried
distcommand. It made the myApp-1.0-SNAPSHOT.zip, but… I can’t use it anywhere, its contents are structured in an unfamiliar way to the web servers.
Please, can someone share a light here on how to get it deployed on one of those?
You should take a look at the HTTP Fronted documentation, especially the Apache integration.
It should be something like:
You’ll need to deploy the Play application in standalone mode, ie without any Java EE container (Tomcat & co). Play 2 core does not provide a way to generate a .war file.
If you want to absolutely use a Java EE container, take a look at the play2-war-plugin.