【发布时间】:2021-05-20 13:37:45
【问题描述】:
我已经下载了tomcat,使用start.sh 和shutdown.sh 来显示默认的localhost:8080 页面,表明tomcat 工作正常,没有问题。我将 tomcat 添加到 intelij 并添加了 intelij 推荐的工件。但是在运行 tomcat 时,我在服务器输出中没有错误,但我无法访问 localhost:8080(404 错误),我尝试使用 tomcat 运行我的 html 页面,但它们似乎仅在 tomcat 使用 intelij 端口时才有效。
tomcat configuration
program structure
artifact
当我单击 URL 的浏览图标并选择 html 页面时,它会自动使用 Intelij 正在运行的端口,而不是通过 8080。当我稍后尝试通过此 html 页面访问我的 servlet 时,没有任何反应,可能因为从未使用过tomcat?
通过http://localhost:63342/Diatom/web/html/startrenewed.html 访问时的 html 页面工作正常。
如何让intellij使用tomcat的8080端口?或者,如果我的问题出在不同的领域,请支持我找出错误的真正所在。
【问题讨论】:
-
即使 Intelij 已关闭,您能否访问 localhost 63342 应用程序?我认为这是在其他地方作为进程运行
-
@ChrisMaggiulli localhost63342 在 intellij 关闭时不提供连接
标签: html tomcat intellij-idea