The debugger cannot access the parent page variable on the included page

I have a parent page called userCreated, and I include another page called confirmUser in it using

<%@include file="confirmationUser.jsp" %> 

on the parent page (userCreated) I have a registerUser variable and I try to see its value in intellij, but I get an error when I use the evaluation expression Local variable '' was not found when closing the class

I am using the latest version of intellij

I can see any local variable that I defined in the confirmation file, what do I need to do to see registerUser in the confirmation User

when I start the page, there is no problem, and it works, but I need to debug, because sometims I get a null pointer exception, and I want to know directly what the problem is.

Parent page

  RegisterUser registerUser = null; 

Page for children

  <% String x = "blabla"; Boolean developer = registerUser.getPackage()!=null && registerUser.getPackage().getName().equals("Developer");%> 

I do not see the registerUser variable here. However, I can see the x variable in the debugger

enter image description here

+5
source share
1 answer

Most likely you need:

  • Set up a web facet for your project if you haven’t;

  • Configure the directory containing your JSP pages as the "Web Resources Directory".

I suspect that (2) is not running, and therefore IntelliJ cannot solve the relative path to the included page.

+3
source

Source: https://habr.com/ru/post/1206432/


All Articles