IntelliJ IDEA and Tomcat problem


I am new to IDEA and tomcat so I am probably doing something so obviously wrong but I can't figure it out. I am trying to make a simple Hello World java web application. I believe I have everything setup correctly as I followed this tutorial:

The only problem I have is that when I run the index.jsp it takes me to http://localhost:8080/index.jsp and shows the tomcat "successfully installed" page, instead of the helloworld page. Is there a setting within IDEA that I might have missed? or is this a tomcat issue? I really have no idea.

If you need more information, please ask.

Thanks for any help.


Comment actions Permalink

Make sure that there is no other instance of Tomcat server when you're running your application. Just look in your process list and kill if there is any. After that try to re-run your application.

Comment actions Permalink

The page you want IDEA to open is set in the "After Launch" field on the "Server" tab in the run/debug configuration. The context to deploy your webapp to is set on the "Deployment" tab's "Application context" field. You need to make sure the deploy context and the context in the start page match:
For example:

By default, tomcat has a Welcome to Tomcat webapp in the root context - that is a context of '/' making the URL:http://localhost:8080/index.jsp . If you want to deploy your webapp in the root context, you need to stop tomcat and go to the directory {tomcat-install-dir}/webapps and delete the ROOT directory. You can then deploy a root webapp by setting the context in your run configuration to just '/' (without the quotes).


Please sign in to leave a comment.