It doesn't matter what NetBeans does. In the deployed application, that's the directory where the file needs to be. If it is not, it will not work. I do see a WEB-INF directory in the image, though.
This is the reason I always advocate to run apps outside of an IDE, because an IDE does some things differently than they work in the real world.
I don't know NetBeans, so I can't advise on how to make it do the right thing. But I do advise to use a standalone server instead for running your application, which uses the directory structure that the servlet spec (and JPA) dictate.
Hi I created the persistence.xml file, for that I had to right-click in the project to choose persistence and persistence unit but I can't in the Persistence library field change the default set from EclipseLink (JPA 2.1) to Hibernate. I've tested it like this but I'm getting an error that I show in the error log. I have Hibernate set to library. Can you help me to set hibernate library?