将 Warbler 制作的 .war 部署到 Tomcat
我试图简单地制作一个 .war 文件并将其放入 Tomcat 的 webapps 目录中。很简单,对吧? :)
让我困惑的是,JRuby 应用程序的目录结构在应用程序结构中很远的地方有index.html 文件,而 Tomcat 默认情况下找不到它。
以下是当我将 url 指向应用程序的 Tomcat 安装时得到的结果: http://128.48.204.195:8080/blog/index.html
我应该如何构建构建/部署 JRuby 应用程序,以便在从 .war 文件中解包后可以在 Tomcat 上运行?
I was trying to simply make a .war file and put it into Tomcat's webapps directory. Simple, right? :)
What is puzzling me is that the directory structure of a JRuby app has the index.html file somewhere far in the application structure and Tomcat just can not find it by default.
Here is what I get when I point my url to the Tomcat install of the application:
http://128.48.204.195:8080/blog/index.html
How should I structure the build/deploy of a JRuby application so that it works on Tomcat when unwrapped out of a .war file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先尝试 http://128.48.204.195/blog
它将提供根路由(如果在 config/routes.xml 中定义) rb) 或错误提示“norroute”。
如果您看到以下内容: http://krokinet.files.wordpress.com/ 2010/11/rails-welcome1.png
/public/index.html 中有一个默认的 index.html 文件,
该文件是由应用程序生成的,您应该在完成初始操作后将其删除“冒烟测试”(第一次运行新生成的应用程序)。
有关根路由的更多信息,请访问:http://edgeguides.rubyonrails.org/routing.html #使用root
first try http://128.48.204.195/blog
that will serve the root route (if defined in config/routes.rb) or a error saying nor route.
If you see this: http://krokinet.files.wordpress.com/2010/11/rails-welcome1.png
there is a default index.html file in /public/index.html
that file is generated with the app and you should remove it once your done an initial 'smoke test' (running your newly generated app the first time).
More information on the root route here: http://edgeguides.rubyonrails.org/routing.html#using-root