将 Warbler 制作的 .war 部署到 Tomcat

发布于 2024-11-03 20:31:56 字数 363 浏览 4 评论 0原文

我试图简单地制作一个 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟花易冷人易散 2024-11-10 20:31:56

首先尝试 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文