2

Is there any way to trace a JSP to determine where it's giving me an error. I get a java.lang.NullPointerException, but I have no idea which part of the code is causing it. Is there any statement I can use to trace where the error occurs?

Superdooperhero
  • 7,584
  • 19
  • 83
  • 138

2 Answers2

0

Look at these links.

http://www.eclipse.org/webtools/initial-contribution/IBM/evalGuides/ServerToolsEval.html

debug JSP from eclipse

Community
  • 1
  • 1
Jayy
  • 2,368
  • 4
  • 24
  • 35
0

Look for the corresponding .java file and set a break point in that at the line throwing the NPE.

A JSP gets compiled to a .java file, before being passed to javac for compilation.

npellow
  • 1,985
  • 1
  • 16
  • 23
  • The oracle process does not seem to keep the .java files. I can find the .class file but not the .java. So no luck there. – Superdooperhero Feb 08 '12 at 11:01
  • Which Servlet Container are you using ? – npellow Feb 08 '12 at 22:38
  • Ok - so you need to work out how to ensure that the intermediary .java files are not deleted. This will be setting you can set on the web server. BTW - Apache is not a servlet container. I am not sure what iAS is. – npellow Feb 10 '12 at 07:30