You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sergey Podatelev <br...@gmail.com> on 2009/05/23 20:03:52 UTC

AbortWithWebErrorCodeException(404) results in blank page

I'm using tomcat, web.xml has the following configuration:

...
<filter-mapping>
    <filter-name>Wicket Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
  <error-page>
    <error-code>404</error-code>
    <location>/404</location>
  </error-page>
...

/404 is mounted to ErrorNotFoundPage.class

So, when I try to access something like localhost:8084/MyApp/fhdwef134,
I get ErrorNotFoundPage.

However, during rendering of a particular bookmarkable page, I throw
AbortWithWebErrorCodeException(404) if the UUID provided in query
string is not referencing to any object in repository.
Instead of ErrorNotFoundPage, I'm getting a blank page.

What am I doing wrong?

-- 
sp

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


Re: AbortWithWebErrorCodeException(404) results in blank page

Posted by Johan Compagner <jc...@gmail.com>.
Your really just have to digg a bit into the container what it exactly does

But  you want that the conatainer redirects to a /404 url and that is
again served by wicket? As a page that is mounted under /404?

Is the url becoming /404? What happens if you just ask for that?

On 25/05/2009, Sergey Podatelev <br...@gmail.com> wrote:
> Okay, at least any pointers why this might happen are appreciated.
>
> On Sat, May 23, 2009 at 10:03 PM, Sergey Podatelev
> <br...@gmail.com> wrote:
>> I'm using tomcat, web.xml has the following configuration:
>>
>> ...
>> <filter-mapping>
>>    <filter-name>Wicket Filter</filter-name>
>>    <url-pattern>/*</url-pattern>
>>    <dispatcher>REQUEST</dispatcher>
>>    <dispatcher>ERROR</dispatcher>
>>  </filter-mapping>
>>  <error-page>
>>    <error-code>404</error-code>
>>    <location>/404</location>
>>  </error-page>
>> ...
>>
>> /404 is mounted to ErrorNotFoundPage.class
>>
>> So, when I try to access something like localhost:8084/MyApp/fhdwef134,
>> I get ErrorNotFoundPage.
>>
>> However, during rendering of a particular bookmarkable page, I throw
>> AbortWithWebErrorCodeException(404) if the UUID provided in query
>> string is not referencing to any object in repository.
>> Instead of ErrorNotFoundPage, I'm getting a blank page.
>>
>> What am I doing wrong?
>>
>> --
>> sp
>>
>
>
>
> --
> sp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: AbortWithWebErrorCodeException(404) results in blank page

Posted by Sergey Podatelev <br...@gmail.com>.
Okay, at least any pointers why this might happen are appreciated.

On Sat, May 23, 2009 at 10:03 PM, Sergey Podatelev
<br...@gmail.com> wrote:
> I'm using tomcat, web.xml has the following configuration:
>
> ...
> <filter-mapping>
>    <filter-name>Wicket Filter</filter-name>
>    <url-pattern>/*</url-pattern>
>    <dispatcher>REQUEST</dispatcher>
>    <dispatcher>ERROR</dispatcher>
>  </filter-mapping>
>  <error-page>
>    <error-code>404</error-code>
>    <location>/404</location>
>  </error-page>
> ...
>
> /404 is mounted to ErrorNotFoundPage.class
>
> So, when I try to access something like localhost:8084/MyApp/fhdwef134,
> I get ErrorNotFoundPage.
>
> However, during rendering of a particular bookmarkable page, I throw
> AbortWithWebErrorCodeException(404) if the UUID provided in query
> string is not referencing to any object in repository.
> Instead of ErrorNotFoundPage, I'm getting a blank page.
>
> What am I doing wrong?
>
> --
> sp
>



-- 
sp

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