简体   繁体   English

如何部署Grails项目

[英]How to deploy grails project

I have copied grails project war file in 我已将grails项目war文件复制到

tomcat/webapp

Then i give its url in browser as 然后我在浏览器中给出其网址为

http://localhost:8080/LCPRLogViewer-0

I am getting 404 error as, 我收到404错误,

The requested resource (/LCPRLogViewer-0.1/WEB-INF/grails-app/views/logSelector/logSelector.jsp) is not available.

Why is that so?? 为什么会这样??

Check your tomcat manager to ensure that the app at that context ( /LCPRLogViewer-0.1 ) deployed successfully! 检查您的tomcat管理器,以确保在该上下文( /LCPRLogViewer-0.1 )上的应用程序已成功部署!

Your next step will be to try deploy the dev war on your local tomcat and confirm that that works too. 下一步将是尝试在您的本地tomcat上部署dev war,并确认它也可以工作。

" grails dev war " or " grails -Dgrails.env=development war " grails dev war ”或“ grails -Dgrails.env=development war

If that does work then the problem lies in your production settings. 如果这样做有效,那么问题出在您的生产设置上。

I ran into a similar issue with one of my Grails projects. 我的Grails项目之一遇到了类似的问题。 In my case, it was because I did not execute "grails install-templates" prior to building the WAR. 就我而言,这是因为在构建WAR之前我没有执行“ grails安装模板”。 I know this probably comes too late for the original poster, but hopefully this will help others who run into this issue. 我知道这对于原始海报来说可能为时已晚,但是希望这会对遇到此问题的其他人有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM