-Igor
On 10/11/06, Jaime De La Jara <[EMAIL PROTECTED]
> wrote:
Hi, changing the url information and reloading causes a RuntimeException stack trace to be shown instead of a custom ErrorPage that I have configured in y app :
This is the configuration being used :
getApplicationSettings().setInternalErrorPage(ErrorPage.class);
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE );
and
protected IRequestCycleFactory getDefaultRequestCycleFactory()
{
return new IRequestCycleFactory()
{
private static final long serialVersionUID = 1L;
public RequestCycle newRequestCycle(Session session,
Request request, Response response)
{
return new WebRequestCycle((WebSession) session,
(WebRequest) request, (WebResponse) response)
{
@Override
public wicket.Page onRuntimeException(wicket.Page page,
RuntimeException e)
{
System.out.println("Page : " + page);
return new ErrorPage(e);
}
};
}
};
}
and ErrorPage constructor is :
public ErrorPage(RuntimeException e)
{
String errorMsg = "Se ha producido un error inesperado";
System.out.println("Exception : " + getRootException(e));
if (UnAuthorizedException.class.isInstance (getRootException(e)))
errorMsg = "Ud. no esta autorizado a realizar esta accion";
add(new Label("error", errorMsg));
add(new Link("homeLink")
{
public void onClick()
{
setResponsePage(new ListContactsPage());
}
});
}
However the following trace is shown when I tweak the Url (as a user could do) and press the reload button :java.lang.NumberFormatException: For input string: "users"Is there some config missing?
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.parseInt(Integer.java:497)
wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters (WebRequestCodingStrategy.java:424)
wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:157)
wicket.Request.getRequestParameters(Request.java:161)
wicket.Page.init(Page.java :1149)
wicket.Page.<init>(Page.java:194)
wicket.markup.html.WebPage.<init>(WebPage.java:119)
wicket.contrib.phonebook.web.page.BasePage.<init>(BasePage.java:53)
wicket.contrib.phonebook.web.page.ErrorPage .<init>(ErrorPage.java:37)
wicket.contrib.phonebook.web.PhonebookApplication$2$1.onRuntimeException(PhonebookApplication.java:249)
wicket.request.compound.DefaultExceptionResponseStrategy.onRuntimeException( DefaultExceptionResponseStrategy.java:125)
wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:64)
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java :76)
wicket.RequestCycle.step(RequestCycle.java:1006)
wicket.RequestCycle.steps(RequestCycle.java:1040)
wicket.RequestCycle.request(RequestCycle.java:454)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java :216)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Thanks,
Jaime.
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user