Playframework + Tomcat Deployment issue

后端 未结 2 1887
借酒劲吻你
借酒劲吻你 2021-01-13 18:27

I am trying to deploy a web app developed in play framework in Tomcat. The first few times I tried, I got the following message in the Tomcat console,

INFO:          


        
2条回答
  •  囚心锁ツ
    2021-01-13 18:53

    Have you tried an earlier version of Tomact? According to the deployment matrix, Play does not 'officially' support Tomact 7, so that may be part of the problem. See here http://www.playframework.org/documentation/1.2.1/deployment

    As for why the application works when you do play run appname and not when you deploy through tomcat, is that the deploment is completely different. Play is not a Java EE compliant framework. It chose not to go down the Servlet spec route, as it felt it was too complicated, bloated and restricted where they wanted to take Play. This is why you don't have things like the Session and other Java EE core functions.

    Therefore, to get Play to work in a Servlet container, it is required to wrap the Play application in a wrapper that exposes the application as a Servlet compliant application, and move it all into a WAR file. You do however lose some of the features of a standard Play application.

    The Play Devs, and I for that matter, would recommend always using the Play application server to get the most out of your application and to ease the deployment, if possible!

提交回复
热议问题