6
votes

I created a new project and created artifact for it. When I run Tomcat from command prompt and go to: http://localhost:8080/IntelProject1/index.jsp

I can see my page.

But when I try to run it from IntelliJ, it opens empty page: http://localhost:8080

and if I try to go to: http://localhost:8080/IntelProject1/index.jsp

this is what it displays:

HTTP Status 404 - /IntelProject1/index.jsp

type Status report

message /IntelProject1/index.jsp

description The requested resource is not available.

Apache Tomcat/7.0.57

The reason it is able to find it from tomcat is because I edited server.xml file in tomcat/conf folder:

<Context path="/IntelProject1" docBase="C:\Users\ibogojevic\Desktop\IntelProject1\web\JSP" />

But I want to be able to open it and debug from within IntelliJ

Maybe my artifact is wrong. Any thoughts?

2
Check step-by-step settings like this: stackoverflow.com/questions/18551130/…Aconic
i consider this unresolved. there is no suitable answer yet the answers don't work for metatsu

2 Answers

11
votes

Open Debug Configuration in IntelliJ IDEA and make sure that Deploy applications configured in Tomcat checkbox is checked as it shown on the screenshot.

enter image description here

5
votes

For me it worked with:

File >Project Structure >Artifacts

In the

Output Layout on the right side >"Available Elements?"

right click on the available libraries ( for me it was "Spring MVC-4.2.4.RELEASE")

Put into Lib

And it worked.