[ https://issues.apache.org/jira/browse/WICKET-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13581356#comment-13581356 ]
Martin Grigorov commented on WICKET-4803: ----------------------------------------- I'm not sure Wicket can do something about this. Issuing http://localhost:8080/%%%% (not the missing '?') leads to : java.lang.NumberFormatException: %% at org.eclipse.jetty.util.TypeUtil.parseInt(TypeUtil.java:320) at org.eclipse.jetty.http.HttpURI.getDecodedPath(HttpURI.java:560) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:440) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Thread.java:662) i.e. again error 500. The only way to show a Wicket page as a handler is to add: <error-page> <error-code>500</error-code> <location>/error</location> </error-page> to web.xml and #mountPage("error", getApplicationSettings().getInternalErrorPage()); > Unwrapped IllegalArgumentException in WicketURLDecoder > ------------------------------------------------------ > > Key: WICKET-4803 > URL: https://issues.apache.org/jira/browse/WICKET-4803 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.5.8, 6.5.0 > Reporter: Johan Heylen > Assignee: Martin Grigorov > Priority: Minor > Fix For: 1.5.10 > > Attachments: WICKET-4803-quickstart-testcase-and-example.zip > > > In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two > IllegalArgumentException which should be wrapped in WicketRuntimeException, > otherwise they are caught by the exception handler form the servlet container > (jetty, tomcat, ...) which then uses their http 500 error code configuration > instead of the exception handling of wicket. > Wrapping them would be good for consistency and help manage runtime > exceptions. > These are the two exceptions: > throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape > (%) pattern"); > throw new IllegalArgumentException("URLDecoder: Illegal hex characters in > escape (%) pattern - " + e.getMessage()); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira