What happens when you try to access the di_foo_test.jsp directly instead of going through index.html?
If I try to access the di_foo_test.jsp directly by specifying url as http://localhost:8080/foowebapp/di_foo_test.jsp?msg=hello
, still I get the same error messages (java.lang.NullPointerException) in response.
which exact version of Glassfish do you use?
How do I check the exact version of glassfish ? I looked at the console after bringing up the server and clicking the version tab in glassfish admin console. From that I concluded that I am using Sun Java System Application Server 9.1_02 (build b04-fcs
). I installed glassfish via glassfish-installer-v2ur2-b04-windows.jar
. I am using JDK184.108.40.206 .
Are you sure that, that version supports injection in JSP?
Not sure. But DI does work in a Servlet. I have verified that myself. The post url which I mentioned does not mention the version of glassfish used .