我正在创建一个游戏!2.1.1 应用程序,我使用 Play2War 打包成一个 war 文件。这需要我application.context=/theApp/
在 application.conf 文件中添加一个上下文 , 。
我将 WAR 文件部署到了一个 tomcat7 服务器,这导致了 url localhost:8080/theApp/。
CSS/JS 文件在 url 为 example 时加载http://localhost:8080/theApp/thisseemstowork
,但一旦 url 为 则http://localhost:8080/theApp/thisoughttowork/180
没有任何 CSS/JS 文件被加载。我只是得到
GET http://localhost:8080/theApp/thisoughttowork/public/javascripts/vendor/bootstrap.min.js 404 (Not Found)
这就是我在视图中链接到 js 文件的方式:
<script src="public/javascripts/vendor/bootstrap.min.js"></script>
这是在我的路线文件中
GET /public/*file controllers.Assets.at(path="/public", file)
有人知道我做错了什么吗?如果您需要更多信息,请告诉我。