You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Thiago H de Paula Figueiredo <th...@gmail.com> on 2007/11/23 15:43:02 UTC

[T5.0.6] Bug with requests to non-existent URLs with extensions

Hi!

Has anyone noticed this behaviour?
I'm writing an application that will replace static HTML files, so I want  
to catch requests for the old HTML ones and redirect to one of my Tapestry  
pages.

If I request the page /xxx, where xxx is a non-existing page, T5 raises a  
standard HTTP 404 error that I'm able to catch through the <error-page>  
tag in my web.xml. So far, so good.

If I request the page /xxx.html, where xxx is a non-existing page, T5 does  
not raise a 404 error: it throws an IllegalArgumentException:

java.lang.IllegalArgumentException: Unable to resolve 'cursos/id10' to a  
known page name. Available page names: [list of my Tapestry pages].
	at  
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:417)
	at  
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:412)
	at  
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
	at  
org.apache.tapestry.internal.services.ComponentClassResolverImpl.canonicalizePageName(ComponentClassResolverImpl.java:410)
	at  
$ComponentClassResolver_1166cebf61d.canonicalizePageName($ComponentClassResolver_1166cebf61d.java)
	at  
org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:59)
[snip]

It looks like non-existent pages checks are done with normal page  
requests, but not with action requests.

Shoudn't Tapestry raise a 404 error in both cases? Should I file a JIRA?

-- 
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

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


Re: [T5.0.6] Bug with requests to non-existent URLs with extensions

Posted by Thiago HP <th...@gmail.com>.
Viva!

What about https://issues.apache.org/jira/browse/TAPESTRY-1874 (provide
annotation-based decorator matching in T5-IoC) now? :)
Thiago

Re: [T5.0.6] Bug with requests to non-existent URLs with extensions

Posted by Howard Lewis Ship <hl...@gmail.com>.
And now it is fixed.  Viva la 404!

On Nov 30, 2007 8:57 AM, Massimo Lusetti <ml...@gmail.com> wrote:
> On Nov 30, 2007 5:45 PM, Thiago HP <th...@gmail.com> wrote:
>
> > Filed: https://issues.apache.org/jira/browse/TAPESTRY-1947
> >
> > Thiago
>
> This has hit me a lot of time but i was too lazy fire the issue. Thanks!
>
> --
> Massimo
> http://meridio.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.

Creator Apache Tapestry and Apache HiveMind

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


Re: [T5.0.6] Bug with requests to non-existent URLs with extensions

Posted by Massimo Lusetti <ml...@gmail.com>.
On Nov 30, 2007 5:45 PM, Thiago HP <th...@gmail.com> wrote:

> Filed: https://issues.apache.org/jira/browse/TAPESTRY-1947
>
> Thiago

This has hit me a lot of time but i was too lazy fire the issue. Thanks!

-- 
Massimo
http://meridio.blogspot.com

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


Re: [T5.0.6] Bug with requests to non-existent URLs with extensions

Posted by Thiago HP <th...@gmail.com>.
Filed: https://issues.apache.org/jira/browse/TAPESTRY-1947

Thiago

Re: [T5.0.6] Bug with requests to non-existent URLs with extensions

Posted by Howard Lewis Ship <hl...@gmail.com>.
Please add to JIRA, it should be consistent and I think the page
render request approach (effectively, reject the request and let the
servlet container report the error) is the correct approach.

On Nov 23, 2007 6:43 AM, Thiago H de Paula Figueiredo
<th...@gmail.com> wrote:
> Hi!
>
> Has anyone noticed this behaviour?
> I'm writing an application that will replace static HTML files, so I want
> to catch requests for the old HTML ones and redirect to one of my Tapestry
> pages.
>
> If I request the page /xxx, where xxx is a non-existing page, T5 raises a
> standard HTTP 404 error that I'm able to catch through the <error-page>
> tag in my web.xml. So far, so good.
>
> If I request the page /xxx.html, where xxx is a non-existing page, T5 does
> not raise a 404 error: it throws an IllegalArgumentException:
>
> java.lang.IllegalArgumentException: Unable to resolve 'cursos/id10' to a
> known page name. Available page names: [list of my Tapestry pages].
>         at
> org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:417)
>         at
> org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:412)
>         at
> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
>         at
> org.apache.tapestry.internal.services.ComponentClassResolverImpl.canonicalizePageName(ComponentClassResolverImpl.java:410)
>         at
> $ComponentClassResolver_1166cebf61d.canonicalizePageName($ComponentClassResolver_1166cebf61d.java)
>         at
> org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:59)
> [snip]
>
> It looks like non-existent pages checks are done with normal page
> requests, but not with action requests.
>
> Shoudn't Tapestry raise a 404 error in both cases? Should I file a JIRA?
>
> --
> Thiago H. de Paula Figueiredo
> Desenvolvedor, Instrutor e Consultor de Tecnologia
> Eteg Tecnologia da Informação Ltda.
> http://www.eteg.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.

Creator Apache Tapestry and Apache HiveMind

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