0
響應寫時,我有一個小門頁是這樣的:IndexOutOfBoundException試圖在檢票口
public final class Services extends WebPage {
public Services() {
super();
}
public Services(PageParameters params) {
StringValue serviceType = params.get("name");
if("report".equals(serviceType.toString())) {
this.getResponse().write("HelloWorld");
}
}
}
,它的HTML是空的。 當我把這個頁面的URL我看到這個錯誤
Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at java.util.Collections$UnmodifiableList.get(Collections.java:1211)
at org.apache.wicket.markup.Markup.get(Markup.java:130)
at org.apache.wicket.Component.internalRender(Component.java:2356)
at org.apache.wicket.Component.render(Component.java:2307)
at org.apache.wicket.Page.renderPage(Page.java:1010)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:271)
at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
...
我不知道是不是真的有什麼是錯誤的,我簡單的小門頁。