Hi,

we've been running into this also.

Fixed this by creating a custom 404 page and setting this as the default start 
page.

FourOhFour.tml

<html   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 <head>
  <meta http-equiv="Refresh" content="0; url=${starturl}" />
 </head>
 <body>
 Page not found
 </body>
</html>


And FourOhFour.java

import org.apache.tapestry5.Link;
import org.apache.tapestry5.annotations.AfterRender;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.PageRenderLinkSource;
import org.apache.tapestry5.services.Response;

public class FourOhFour
{

        @Inject
        private Response response;

        @Inject
        private PageRenderLinkSource resources;


        @AfterRender
        public void afterRender()
        {
                response.setStatus(404);
        }


        public Link getStartURL()
        {
                return resources.createPageRenderLink(SomeOtherStartPage.class);
        }

}

And in AppModule we set the default start page to our FourOhFour page

        public static void contributeApplicationDefaults(
                                        MappedConfiguration<String, String> 
configuration)
        {
                configuration.add(SymbolConstants.START_PAGE_NAME, 
"FourOhFour");

        }


Hope this helps.

M.


Am 15.10.2010 um 10:09 schrieb stephanos:

> 
>> As the JIRA ticket says, this is expected behavior. In your case, /blabla  
>> is considered a request to / (Index) with one activation context parameter  
>> 'blabla' as there's no page named 'blabla'.
> 
> I was just wondering why the ticket is still 'Open' and has a patch that
> apparently was never actually used...
> 
>> Hmm... that's true, the Start page is "broken" as well in 5.2 - you 
>> can't get it to return 404s anymore using Start page the same way as 
>> in 5.1.
> 
> So the solution should be renaming it 'Start.tml' (could be documented
> somewhere *g*)? I used 5.2 straight away without 5.1 because I needed the
> Spring 3 support. Could you open a JIRA issue then? - it might be better if
> an experienced tapestry user opens it :)
> 
> Cheers!
> -- 
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/No-404-error-is-raised-tp3212773p3213305.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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

Reply via email to