Cannot run/debug jsp page from within IntelliJ using Tomcat server
Solution 1
Open Debug Configuration in IntelliJ IDEA and make sure that Deploy applications configured in Tomcat checkbox is checked as it shown on the screenshot.
Solution 2
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.
Angelina
We are here to help and educate and never discourage others but always help to the best of our ability and point to the right direction.
Updated on June 07, 2022Comments
-
Angelina almost 2 years
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?