【问题标题】:How to install tomcat use it in intellij. Ubuntu如何安装 tomcat 在 intellij 中使用它。 Ubuntu
【发布时间】:2020-03-01 12:00:41
【问题描述】:

我想做什么

我尝试在 Ubuntu 18.4 上安装 tomcat。然后我想用RESTfulWebServiceWebApplicationInteliJ Ultimate 中创建简单的JavaEnterprise 应用程序。

Ubuntu 安装

我运行了sudo apt-get install tomcat9,安装过程很顺利。

InteliJ 配置

但是我不知道在 Tomcat Home 空框中的 InteliJ 配置中写什么。我一直收到错误'The selected directory is not valid Tomcat home'

可能的解决方案,但我不想手动安装tomcat

可能是推荐手动安装tomcat的原因? https://www.javahelps.com/2015/03/install-apache-tomcat-on-ubuntu.html

我不想那样安装它,因为以后卸载它对我来说很难,而且我的系统会很乱。

Docker 安装

我放弃了apt-get 解决方案,并使用以下命令在docker中安装了tomcat: sudo docker run tomcat:9.0

我在 InteliJ 中打开了 Docker 选项卡:

我不知道如何通知 InteliJ 在 Docker Container 中调用 recursing_haibt 是一个 tomcat 服务器,它将处理简单的 HelloWorld 应用程序并在浏览器中打开它

我不知道该怎么办。

【问题讨论】:

  • 尝试将Tomcat home设置为/usr/share/tomcat9,将Tomcat Base设置为/var/lib/tomcat9

标签: java docker ubuntu tomcat intellij-idea


【解决方案1】:

当我遇到这种卡住时,我得到了这个文档并纠正了它 https://askubuntu.com/questions/968089/how-to-add-tomcat-8-into-intellij-idea

【讨论】:

    猜你喜欢
    • 2015-07-19
    • 1970-01-01
    • 2015-10-26
    • 2012-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-25
    相关资源
    最近更新 更多