如何查看我的Wicket应用程序的堆栈跟踪?
问题描述:
我是Wicket新手,正在从事现有项目。如何在UI上看到Wicket的堆栈跟踪?目前我看到以下内容:如何查看我的Wicket应用程序的堆栈跟踪?
内部错误
返回首页
我已在log4j.xml
以下,但没有看到任何堆栈跟踪日志中的任一:
<logger name="org.apache.wicket">
<level value="DEBUG"/>
</logger>
答
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);
}
}
答
另外,调试输出的细节由检票的“配置”运行时间决定,请参见http://clipmarks.com/clipmark/B00CE497-A646-4CB6-B85D-F68332903C5A/的简要说明
答
<context-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</context-param>
更新web.xml中发展,而不是部署
是的,但不是在部署环境..切换到开发模式是这里的更好的选择。 – Tim 2011-01-12 20:21:22