You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pkc <pk...@gmail.com> on 2012/02/17 01:29:07 UTC
1.5.4 error handling with web.xml issue
Am I missing something simple? I tried about 100 misc trial and error things
to get this to use my wicket page to handle 404's (and other errors).
<filter-mapping>
<filter-name>wicket</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<error-page>
<exception-type>Exception</exception-type>
<location>/ErrorPage</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/ErrorPage</location>
</error-page>
public class ErrorPage extends WebPage
{
private static final long serialVersionUID = 1L;
public ErrorPage(PageParameters parameters)
{
}
@Override
public boolean isErrorPage() {
return true;
}
}
public class MainApp extends WebApplication {
@Override
public void init()
{
super.init();
mountPage("ErrorPage", ErrorPage.class);
...
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4395935.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5.4 error handling with web.xml issue
Posted by Bas Gooren <ba...@iswd.nl>.
It's documented here:
https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html
Op 17-2-2012 2:39, schreef pkc:
> I have no idea if this is documented and why it is needed but it works after
> changing web.xml to
>
> <filter-mapping>
> <filter-name>wicket</filter-name>
> <url-pattern>/*</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> <dispatcher>ERROR</dispatcher>
> </filter-mapping>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4396055.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
Re: 1.5.4 error handling with web.xml issue
Posted by pkc <pk...@gmail.com>.
I have no idea if this is documented and why it is needed but it works after
changing web.xml to
<filter-mapping>
<filter-name>wicket</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4396055.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5.4 error handling with web.xml issue
Posted by robmcguinness <ro...@gmail.com>.
not sure if the *"/"* matters when you mount the url.
mountPage("/ErrorPage", ErrorPage.class);
rob
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4395984.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org