[Solved] Why isn’t this JSP – Servlet code work?


A NullPointerException, most of the time, means that you’re dereferencing a null variable. I assume the line causing the exception (line 97 in z.java, as the stack trace indicates) is the following line:

yy.getXs().add(s);

Then it can mean two things:

  1. yy is null
  2. The list returned by yy.getXs() is null.

Use a debugger to identify the problem, or add logging traces in your code.

4

solved Why isn’t this JSP – Servlet code work?