Description
There are two pages TestPage (homepage, HttsRequired) and TestPage2 (http only).
TestPage2 contains empty form:
add(new Form<Void>("form"));
TestPage contains a form with a single submit button:
Form<String> form = new Form<String>("form", new Model<String>()) {
private static final long serialVersionUID = 7401870238638554392L;
@Override
protected void onSubmit()
};
add(form);
When the form is submitted a NullPointerException is throw during the render of TestPage2:
java.lang.NullPointerException
at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1400)
at org.apache.wicket.Component.internalRenderComponent(Component.java:2473)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
at org.apache.wicket.Component.internalRender(Component.java:2366)
..................
This exception is thrown in TestPage2's form in the method onComponentTag on line 1400:
String url = getActionUrl().toString();
because getActionUrl() returns null. Debugging getActionUrl leads to RequestCycle->mapUrlFor and there requestMapper.mapHandler(handler); fails to map the handler. The "handler" variable is of type SwitchProtocolRequestHandler.
This can be reproduced with the attached quickstart. It's using the default ports (80 and 443) and a self-signed certificate (hope there are no problems with it).