kuba44
kuba44

Reputation: 1878

Which application context set in IntelliJ IDEA for Tomcat?

So far I run Tomcat server (v. 7.0.26) in windows command by catalina.bat start script. If I want to deploy my web app I have to build it by Maven and copy WARs to specify Tomcat deploy directory. When server start everything is ok.

Now I try to connect my web app to IntelliJ IDEA Ultimate 2017.1.4. My app have multiple WARs. At Run/Debug Configuration I add new Tomcat Server. At the Deployment tab I have:

deployment tab

I have to choose Application context but if I set blank for more than one artifact I get error Duplicate context path''. Same situation is when I choose /. If I try to run server nothing deploy. Which application context I should set?

Upvotes: 3

Views: 10039

Answers (1)

SilverNak
SilverNak

Reputation: 3381

The application context will be part of the URL you have to enter in your browser when accessing the application. You could use the name of your war file:

kb-hook

Then you can enter the adress in your browser and find the application. (Given your Tomcat runs on port 8080) You will maybe have to add a path to a resource within the war behind that URL.

http://localhost:8080/kb-hook/

You could also choose another name, but the name of the war file is chosen quite often.

Upvotes: 3

Related Questions