Java 在 Tomcat 上运行 Play Framework 2.0?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9737562/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-16 06:55:48  来源:igfitidea点击:

Running Play Framework 2.0 on Tomcat?

javatomcatplayframework-2.0

提问by Rob Fox

I can't find any information about deploying Play Framework 2.0on Tomcat, is it even possible? If so, where can I find any info regarding it.

我找不到有关在 Tomcat 上部署 Play Framework 2.0 的任何信息,这可能吗?如果是这样,我在哪里可以找到有关它的任何信息。

采纳答案by mguymon

Sadly, it is not supported in the Play 2.0 release. Looks like the feature got pushed to 2.1, here is the the ticket.

遗憾的是,Play 2.0 版本不支持它。看起来该功能被推送到 2.1,这是票证

Update

更新

There is a plugin that aims are war support for Play 2: https://github.com/dlecan/play2-war-plugin/

有一个插件旨在为 Play 2 提供War支持:https: //github.com/dlecan/play2-war-plugin/

回答by Max Keller

The call for play framework 1.2 is play war myapp -o myapp.war

play 框架 1.2 的调用是 play war myapp -o myapp.war

I'd try that in play framework 2, although it's not in the documentation any more. Unfortunately I can't try if it still works because I don't have play on this machine.

我会在 play framework 2 中尝试,尽管它不再出现在文档中。不幸的是,我无法尝试它是否仍然有效,因为我没有在这台机器上玩。

回答by fracca

The Asynchronous IO model is not supported by Servlet 3.0 containers. See post by one of the committers below:

Servlet 3.0 容器不支持异步 IO 模型。请参阅以下提交者之一的帖子:

"We are experimenting with this right now, however, it looks like what we need is JSR-340 JSR-340: http://jcp.org/en/jsr/detail?id=340timeline for JSR-340: http://java.net/projects/servlet-spec/lists/users/archive/2012-03/m... based on the timing it looks unlikely that this will be part of 2.1, so I am changing the milestone to "none"."

“我们现在有了这个正确的实验,然而,它看起来像我们需要的是JSR-340 JSR-340: http://jcp.org/en/jsr/detail?id=340时间表JSR-340: HTTP: //java.net/projects/servlet-spec/lists/users/archive/2012-03/m...根据时间,这看起来不太可能成为2.1的一部分,所以我将里程碑更改为“无“。”

回答by Antoine Leclair

There is a plugin.

有一个插件。

https://github.com/dlecan/play2-war-plugin

https://github.com/dlecan/play2-war-plugin

It's not flawless as of now (April 2012) but there is a lot of commits done every day.

截至目前(2012 年 4 月),它并不是完美无缺的,但每天都有很多提交。