我是Wicket的新手,正在开展现有项目。如何在UI上看到Wicket的堆栈跟踪?目前我看到以下内容:
内部错误
返回主页
我在log4j.xml
中设置了以下内容,但在日志中看不到任何堆栈跟踪:
<logger name="org.apache.wicket">
<level value="DEBUG"/>
</logger>
答案 0 :(得分:4)
public class MyApplication extends WebApplication {
@Override
protected void init() {
/* ... */
// Tells wicket to use a helpful 'debug' exception page with a snapshot of the
// component model, and the exception stack trace.
// Other settings are available to show pages that say there has been an internal error
// (a production-friendly page)
// In addition, more advanced usage allows you to override this behavior completely.
getSettings().setUnexpectedExceptionDisplay(ApplicationSettings.SHOW_EXCEPTION_PAGE);
}
}
答案 1 :(得分:2)
<context-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</context-param>
将web.xml更新为开发而非部署
答案 2 :(得分:0)
此外,调试输出的详细信息由wicket的“配置”运行时确定,请参阅http://clipmarks.com/clipmark/B00CE497-A646-4CB6-B85D-F68332903C5A/的简短说明