How to create playFramework application's WAR file and deploy it in Tomcat 6
May I know the way to create a war
file which work same as the application while running in playFramework
? As I tried on Windows XP, running play war mayapp -o myapp.war
resulted in a mya开发者_如何学编程pp.war
folder. I then placed the folder into Tomcat 6 in the webapps directory.
Then, I started myapp.war
in Tomcat by going to https:localhost:8080/myapp.war
.
Problem is: my application at above URL behaves wrongly. There is no CSS nor Javascript. The webpage URLs are not in the expected form.
The problem you have is due to the concept of a WAR context. Take a look at the following related question, which should solve your problem.
how to use "war.context" in Configuration file of Play Framework ?
can you try this url:
http://localhost:8080/myapp/
Can you see the CSS this way?
精彩评论