使用 Warbler 制作 .war 时获取正确的应用程序结构 [英] Getting the application structure correct when using Warbler to make a .war

查看:35
本文介绍了使用 Warbler 制作 .war 时获取正确的应用程序结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Warbler 中的说明说我应该在应用程序目录结构的根目录下运行它.

The instructions in Warbler say that I should run it at the root of the directory structure of an application.

index.html 最终不在 .war 的根目录中,因此导致了问题.

The index.html ended up being not in the root directory of the .war so it caused problems.

这是我刚刚使用的 ruby​​ 服务器:

Here is my just-ruby server:

http://128.48.204.195:3000/

它工作正常,但是当我使用 warbler 并将战争放入 tomcat 时,会发生以下情况:

It works fine, but then, when I used warbler and put the war into tomcat, here is what happens:

http://128.48.204.195:8080/blog/index.html

导致这种目录结构不匹配的原因是什么?这通常是如何处理的?

What is causing this kind of mis-match-ness of the directory structures? How is this typically handled?

谢谢!

推荐答案

我希望我理解正确,你想访问这个链接:'http://128.48.204.195:8080/blog/index.html'

I hope I'm understanding you correctly, you want to access this link: 'http://128.48.204.195:8080/blog/index.html'

但是你输入这个网址:

http://128.48.204.195:8080/index.html

并且您的应用程序部署到/webapps 文件夹内的 tomcat.默认情况下,tomcat 认为您希望您的应用程序位于其自己的子上下文中,因此 '../blog/...' 看看这个

and your application is deployed into tomcat inside the /webapps folder. By default tomcat thinks you want your app to be under its own subcontext hence the '../blog/...' Check this out

这篇关于使用 Warbler 制作 .war 时获取正确的应用程序结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆