gpt4 book ai didi

eclipse - 如何在 tomcat 服务器中更改我的 webapp 的 url?

转载 作者:行者123 更新时间:2023-11-28 23:38:23 24 4
gpt4 key购买 nike

eclipse中的目录结构是——
MyProjectName(
WebContent(
META-INF(
MANIFEST.MF
),
app(
appname(
index.html
)
),
WEB-INF(web.xml)
)
)
我可以使用 tomcat7 访问我的项目 http://<code>localhost</code>:8080/MyProjectName/app/appname/index.html我想使用它来访问它 http://<code>localhost</code>:8080/MyProjectName/

除了 html/js/css,我没有使用任何其他代码,所有代码都只在 Webapps 目录中。

Spring、Tomcat7、windows7是平台。

最佳答案

如果它是一个欢迎文件,请在 web.xml 中像下面这样使用

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>/app/appname/index.html</welcome-file>
</welcome-file-list>

关于eclipse - 如何在 tomcat 服务器中更改我的 webapp 的 url?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22472440/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com