JSP debugging in IntelliJ IDEA

Viewed 90638

Does anyone know how to debug JSP in IntelliJ IDEA?

When I set breakpoint in my JSP files, those breakpoints never seem to take effect. The debugger never hits them. IDEA seems to think that the breakpoints are valid. I do see a red dot placed to the left of the line where I place my breakpoint.

I read in IntelliJ forum in this post that JSP files need to be under web-inf for debugging to work.

But then I also read that JSP files placed under web-inf won't be directly accessible by the user.

I am not sure who's really right.

6 Answers

For the second part of your question ("jsp files placed under web-inf won't be directly accessible by user") that is correct. To allow users to access JSP files in the WEB-INF folder servlet and servlet-mapping entries need to be made in the web.xml file for each JSP page.

Related