我按照这个例子来本地化img:http://www.wicket-library.com/wicket-examples/pub/?0
这是可行的。只有一个问题。我需要有图像在包中,我有我不喜欢的java类。如何设置webapp/img的路径?
我试着设置:
add(new Image("work", new PackageResourceReference(StatisticPage.class, "/img/work.png")));或
add(new Image("work", new PackageResourceReference(StatisticPage.class, "img/work.png")));但是没有成功
发布于 2012-09-11 16:50:22
使用ContextImage而不是Image。
发布于 2012-09-11 16:53:42
使用ContextRelativeResource。
https://stackoverflow.com/questions/12365906
复制相似问题