Where is my app placed when deploying to Tomcat?

2019-01-21 22:25发布

I am deploying an application from IntelliJ idea to the local Tomcat server. I thought the apps you deploy are placed in the webapps folder, however it does not turn up there. Is this correct? Where is it?

5条回答
小情绪 Triste *
2楼-- · 2019-01-21 22:41

If you're following the standard maven approach, which is highly recommended, then your output goes to the target directory, not out. With the maven approach you'll probably have multiple modules under your project root, and the target directory will be found under each module. The web application is then built into an exploded directory named after the module, but with .war as an extension. So, you have:

project/module/target/webapp.war
查看更多
仙女界的扛把子
3楼-- · 2019-01-21 22:41

I am new to IntelliJ IDEA. In my config. I add a local tomcat server. My tomcat container is run the project's target folder.

${your project's path}\target\ ${your project's name}

In this path ,you will find the file that IDEA has build. And tomcat server would run this folder.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-21 22:43

Yes, If you are using IntelliJ IDEA the application does not turn up on Tomcat webapps directory. Your artifacts are in directory, for example:

${dir.to.idea.project}\YourWebApp\out\artifacts

This is default directory created by IntelliJ.

Tomcat configuration is in the different folder. I am using windows 7. So it is:

C:\Users\User\.IntelliJIdea10\system\tomcat\YourApplicationName
查看更多
你好瞎i
5楼-- · 2019-01-21 22:49

If you are using Intellij IDEA your artifacts are deployed directly from output directory: ${project.dir}\${web.module}\out\artifacts or ${project.dir}\${web.module}\target if you're using Maven and follow Standard Directory Layout.

Tomcat configuration is in different folder.

Mac:     /Users/${user}/Library/Caches/IntelliJIdea${version}/tomcat/  
Linux:   /home/${user}/.IntelliJIdea${version}/system/tomcat/
Windows: C:\Users\${user}\.IntelliJIdea${version}\system\tomcat\
查看更多
Anthone
6楼-- · 2019-01-21 22:56

Just for reference, the corresponding folder on a mac (for IntelliJ 13) is:

/Users/<username>/Library/Caches/IntelliJIdea13/tomcat/
查看更多
登录 后发表回答