I'm facing another issue now: "java.lang.IllegalArgumentException: no file extension in servlet path: /modelImageProcessing". It Happens when I try to access my Dao or EntityManager from the servlet.
EntityManager em = JpaResourceBean.getEm();
or even
JpaDao<Entityname> dao = new JpaDao<Entityname>();
It don't even reach the class...
My web xml seems to be ok:
I'm missing something, but can't find it
Edit1: Actually, I managed to get it:
EntityManager em = (EntityManager) getServletContext().getAttribute("entityManager");
But it always returns null... It's been years since I've been working with servlets! Maybe I'll get the EMF and create the EM manually...
Edit 2: Had to go with the last line. Creating an em.
@PersistenceUnit(unitName="pu")
private EntityManagerFactory emf;
Still not getting a image display, firebug throws: "Image corrupt or truncated:
http://localhost:8080/app/modelImageProcessing?id=1"