Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtmosphereServlet does not delegate to the default servlet if no filter matches #595

Closed
papegaaij opened this issue Sep 4, 2012 · 11 comments
Labels

Comments

@papegaaij
Copy link

When the last filter in the chain calls AtmosphereFilterChain.doFilter, a ServletException is thrown with "No Servlet Defined". If you look at https://github.com/papegaaij/wicket-atmosphere-quickstart , the AtmosphereServlet is mapped to /app and delegates to WicketFilter. Opening /foobar will give a 404, while opening /app/foobar gives a 500. This second url, which is not processed by the WicketFilter, should delegate to the same DefaultServlet and also give a 404.

@jfarcand
Copy link
Member

jfarcand commented Sep 4, 2012

Salut, not sure it is a bug but agree Atmosphere could do better. Working on it.

jfarcand added a commit that referenced this issue Sep 4, 2012
@jfarcand jfarcand closed this as completed Sep 4, 2012
@drzewo
Copy link

drzewo commented Oct 3, 2012

I don't quite think this is a valid solution to the original issue. It appears that filter-only based applications (like apache wicket) do not initialize at all, as there is no servlet declared in web.xml (or otherwise in the webapp), In fact it is WicketFilter's chore to delegate to default servlet if it is not slated for servicing the request for the particular resource.

@jfarcand
Copy link
Member

jfarcand commented Oct 3, 2012

@drzewo Can you elaborate? Are you saying installing a filter without with Atmosphere doesn't work?

@drzewo
Copy link

drzewo commented Oct 3, 2012

Just go grab emond's quickstart app, update atmosphere dependency to 1.0.1 and deploy. It won't even initialize properly, while atmosphere 1.0.0 works pretty nice. Although it fails on delegating request processing to default servlet: Wicket filter performs chain.doFilter(request,response) whenever request for some e.g. static resource should be processed by some other entity, most probably DefaultServlet. ATM, I can't think of anything that mimics this behaviour to be performed in AtmosphereFilterChain.doFilter().

@jfarcand
Copy link
Member

jfarcand commented Oct 5, 2012

This buh has been fixed (broken in 1.0.1) and will be available with 1.0.2.

@esajjkh
Copy link

esajjkh commented Oct 11, 2012

Hi,
I'm testing custom error pages for https://github.com/papegaaij/wicket-atmosphere-quickstart application. I modified quickstart application for this purpose and error pages are configured in web.xml like this:

<error-page>
        <error-code>403</error-code>
        <location>/error/error404</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/error/error404</location>
    </error-page>
    <error-page>
        <error-code>503</error-code>
        <location>/error/error404</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/error/error404</location>
    </error-page>

and error page is mounted as:
mountPage("error/error404", Error404.class);

I'm supposed to get my Error404 page when url is /app/foobar or /foobar . Am I missing something?

@esajjkh
Copy link

esajjkh commented Oct 11, 2012

oops my tags are disappeared from my post, anyways error pages are confiured by using error-page main tag followed by error-code and error-location.
Thank you

@jfarcand
Copy link
Member

Salut, can you share a test case?

@esajjkh
Copy link

esajjkh commented Nov 6, 2012

Yahoo, it works with wicket 6.2.0 and atmosphere 1.0.2 :)

@Floaz
Copy link

Floaz commented Apr 11, 2013

But doesn't work with Wicket 6.6.0 and atmosphere 1.0.8. :-(
Same as above.

@jfarcand
Copy link
Member

@Floaz Try with 1.0.12...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants