You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Karl-Heinz Golz <ka...@t-online.de> on 2014/09/23 15:00:40 UTC

access to url at http 404

Hello,

is it possible to get the incorrect url when error 404 occurs?

I would like to inspect this url and react differently for
- users who want access but did a mistake in the url or
  bookmarked an url which is no longer valid
  -> show StartPage (with some more functionality)
- others who want to access through "brute-force" by adding garbage to
the url
  -> show a short error page
 
I am using Wicket 6.17.0.

many thanks in advance
Karl-Heinz


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: access to url at http 404

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can use
http://docs.oracle.com/javaee/7/api/javax/servlet/RequestDispatcher.html#ERROR_REQUEST_URI
to get the original uri.
It is stored as request attribute.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Sep 23, 2014 at 4:00 PM, Karl-Heinz Golz <
karl-heinz.golz@t-online.de> wrote:

> Hello,
>
> is it possible to get the incorrect url when error 404 occurs?
>
> I would like to inspect this url and react differently for
> - users who want access but did a mistake in the url or
>   bookmarked an url which is no longer valid
>   -> show StartPage (with some more functionality)
> - others who want to access through "brute-force" by adding garbage to
> the url
>   -> show a short error page
>
> I am using Wicket 6.17.0.
>
> many thanks in advance
> Karl-Heinz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>