Syntax error results in blank page

Posted by Philipp on Stack Overflow See other posts from Stack Overflow or by Philipp
Published on 2010-06-18T09:09:23Z Indexed on 2010/06/18 9:13 UTC
Read the original article Hit count: 259

Filed under:
|

I am new to wicket and trying to get some things working.
One thing that annoys me a lot is that I get a blank (0 chars of text) page whenever there is a syntax error on a page.

Striped down example:
Test.html

header stuff: doctype ... html ... head ... body ...
  <span wicket:id="msgTest" id="message">MSG</span>
footer stuff: /body ... /html

Test.java

public class Test extends WebPage {
    public Test() {
        add(new Label("msgTest", "Hello, World!"));
    }
}

This will output the page as expected.
Now, lets introduce an error:

header stuff: doctype ... html ... head ... body ...
  <span wicket:id="msgTest2" id="message">MSG</span>
footer stuff: /body ... /html

I changed the label-id to something different then what the source-file expects.
If I run this code I get the already mentioned blank page.
However, for every request to a page with such a syntax error I get an error report in the log-file of around 1000+ lines. This error-report is basically just wicket-generated html of a page which describes the error.
This makes me wonder why wicket isn't displaying the error-stuff instead of the blank page. I'm not very experienced with wicket but to me it somehow looks like wicket is having trouble rendering its own error-page code.

It would be nice to know how one goes about finding syntax-errors with wicket.
Reading through a 1000+ line error-report for a small error like a misplaced character seems a bit tedious.

Thanks in advance for guiding me into the right direction :)

PS:
wicket-version: 1.4.9
stage: development

© Stack Overflow or respective owner

Related posts about java

Related posts about wicket