在我的第一个基于 Quickstart Maven 原型的 Wicket 项目(在 Wicket 6.20 中使用 Eclipse mars 和 Glassfish 4.1 开发)中,我使用
getResourceSettings().getResourceFinders().add(new WebApplicationPath(getServletContext(), "html"));
将标记与代码分开。
我的主页运行良好,但 WicketTester 抛出异常org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup. Component is not yet connected to a parent. [Page class = ...MyProject.HomePage, id = 0, render count = 1]
这个问题似乎在文献中的任何地方都没有解决。