Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in tutorial for building a tree from database data -- java refers to jsp tag id.  RSS feed

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am teaching myself a bit of java, and was working through a tutorial on generating a tree structure from database data. (Currrently found at

All is going well, except for one bug which has me stumped. The java method "prerender" refers to the tree item from the jsp page, but I keep getting an error saying that "variable displayTree might not have been initialized".

The jsp code is:

and here is the snippet from the java:

So, I know that the java code is supposed to be referring to the jsp object, but it doesn't seem able to resolve that reference. There is no displayTree reference anywhere in the class definition. Any ideas on what I might be doing wrong?

Thanks in advance.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!