You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/01/28 00:46:39 UTC

[3.1] Friendly URLs

A good start to the friendly URLs for Tapestry 3.1 is in place now:

http://jakarta.apache.org/~hlship/tapestry/UsersGuide/friendly-urls.html

I've been running the Workbench and getting URLs like:

/restart.svc
/Home.direct?component=...
/ErrorFest.page

Those are looking a bit friendlier to me!

-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


RE: [3.1] Friendly URLs

Posted by Nanda Firdausi <en...@gmx.net>.
Wow... superb :)) 

How about switchable error page from test-mode and production mode. For test
mode it will be better if deveoper get all information that he want such as
tapestry error page, but in production such error should not seen by user,
so it redirected to other page or just show traditional error page.

Cheers,
Nanda Firdausi

> -----Original Message-----
> From: Paul Ferraro [mailto:pmf8@columbia.edu] 
> Sent: 28 Januari 2005 22:48
> To: Tapestry development
> Subject: Re: [3.1] Friendly URLs
> 
> Excellent.  This gives me a few ideas...
> Now that Tapestry urls can simulate a traditional web server 
> directory structure, perhaps we should add some flexibility 
> into our exception handling such that it too can simulate 
> traditional behavior...
> 
> 1.  What if I attempt to access a page that does not exist?  
> I would expect to be able to differentiate this exception 
> from an application related one.  The page/external services 
> could throw a PageNotFoundException (extends 
> ApplicationRuntimeException).  I may want to override this 
> exception handling logic such that it returns a 404 error 
> code so that my servlet engine can handle it in the traditional
> fashion:
> <web-app>
>     <!-- ... -->
>     <error-page>
>         <error-code>404</error-code>
>         <location>PageNotFound.page</location>
>     </error-page>
>     <!-- ... -->
> </web-app>
> 
> 2.  Let's say I have a page called "news/index".  What 
> happens if I try to access "http://mydomain/mycontext/news/" 
> ?  I may want to override this exception handling logic such 
> that the requests to pages ending in "/" get forwarded to 
> some configured welcome page. e.g. "/news/index.page".
> 
> Thoughts?
> 
> Paul


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


Re: [3.1] Friendly URLs

Posted by Paul Ferraro <pm...@columbia.edu>.
Excellent.  This gives me a few ideas...
Now that Tapestry urls can simulate a traditional web server directory 
structure, perhaps we should add some flexibility into our exception 
handling such that it too can simulate traditional behavior...

1.  What if I attempt to access a page that does not exist?  I would 
expect to be able to differentiate this exception from an application 
related one.  The page/external services could throw a 
PageNotFoundException (extends ApplicationRuntimeException).  I may want 
to override this exception handling logic such that it returns a 404 
error code so that my servlet engine can handle it in the traditional 
fashion:
<web-app>
    <!-- ... -->
    <error-page>
        <error-code>404</error-code>
        <location>PageNotFound.page</location>
    </error-page>
    <!-- ... -->
</web-app>

2.  Let's say I have a page called "news/index".  What happens if I try 
to access "http://mydomain/mycontext/news/" ?  I may want to override 
this exception handling logic such that the requests to pages ending in 
"/" get forwarded to some configured welcome page. e.g. "/news/index.page".

Thoughts?

Paul

Howard Lewis Ship wrote:

>A good start to the friendly URLs for Tapestry 3.1 is in place now:
>
>http://jakarta.apache.org/~hlship/tapestry/UsersGuide/friendly-urls.html
>
>I've been running the Workbench and getting URLs like:
>
>/restart.svc
>/Home.direct?component=...
>/ErrorFest.page
>
>Those are looking a bit friendlier to me!
>
>  
>


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


Re: [3.1] Friendly URLs

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
+1 for Howard!

	Erik


On Jan 27, 2005, at 6:46 PM, Howard Lewis Ship wrote:

> A good start to the friendly URLs for Tapestry 3.1 is in place now:
>
> http://jakarta.apache.org/~hlship/tapestry/UsersGuide/friendly- 
> urls.html
>
> I've been running the Workbench and getting URLs like:
>
> /restart.svc
> /Home.direct?component=...
> /ErrorFest.page
>
> Those are looking a bit friendlier to me!
>
> -- 
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


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