You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sa...@women-at-work.org on 2005/02/25 10:06:05 UTC
Tapestry project available for bidding
Thinking of placing a tapestry project on elance.com soon about the
following:
Integration of http://tuckey.org/urlrewrite/manual/ with Tapestry.
So in the end you can do the following:
- pages will generally be accessible at www.domain.com/page
- specifying within the .application file which urls are mapped to an
external page (using a regular expression)
- modify the Link components to link to the clean urls
Could not find any tapestry programmers on elance though :-(
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
CoolUriServletDispatcher or Tuckey UrlRewriteFilter ?
Posted by sa...@women-at-work.org.
What would be easier to integrate for Tapestry?
CoolUriServletDispatcher or
Tuckey's UrlRewriteFilter ?
Has anyone furher experience with the Tapestry innards as for
linking/decoding of urls ?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by sa...@women-at-work.org.
Multiple urls to one (e.g. different language version).
i guess everything is possible...in theory
> On Feb 25, 2005, at 8:28 AM, sarah.simbad@women-at-work.org wrote:
> > Within the html templates, everything stays the same...just a different
> > component:
> >
> > <span jwcid"@MyLink" page="Food"/>
> >
> > or maybe a new component with the same name, so you dont need to touch
> > any
> > of the code that is already written:
> >
> > <span jwcid"@ExternalLink" page="Food"/> or
> > <span jwcid"@DirectLink" page="Food"/>
>
> I don't believe you'll be able to (or would want to if you can)
> override the names of the built-in components. Just use a custom link
> component is my recommendation, perhaps in a library so that you can
> namespace it.
>
> > the something.applicaton would define the mapping
> > that is usually in httpd.conf or within web.xml but
> > Tapestry specific to tell the own engine what to do.
> >
> > <page name="Food" specification-path="/Food.page">
> > <mapping food/(.*)/(.*) Food?cat=$1&type=$2&addons=$3/>
> > </page>
>
> I'm pretty sure the Tapestry DTD won't allow for custom elements like
> this. You'd need to pull the mappings out. Would you map different
> URL's to the same .page? Or would it be one-to-one? If its one-to-one
> you could put the URL mapping in the .page file itself as a <property>.
> And the link component could ask the page to provide its URL even.
>
> > This would lead to having a clean link like:
> >
> > /food/yyy/zzz
> >
> > instead of having a Tapestry link like:
> >
> > /app?service=page/Home?cat=xxx&type=yyy&addons=zzz
>
> This part of what you are asking is quite trivial with a servlet
> filter. Really, it is!
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 25, 2005, at 8:28 AM, sarah.simbad@women-at-work.org wrote:
> Within the html templates, everything stays the same...just a different
> component:
>
> <span jwcid"@MyLink" page="Food"/>
>
> or maybe a new component with the same name, so you dont need to touch
> any
> of the code that is already written:
>
> <span jwcid"@ExternalLink" page="Food"/> or
> <span jwcid"@DirectLink" page="Food"/>
I don't believe you'll be able to (or would want to if you can)
override the names of the built-in components. Just use a custom link
component is my recommendation, perhaps in a library so that you can
namespace it.
> the something.applicaton would define the mapping
> that is usually in httpd.conf or within web.xml but
> Tapestry specific to tell the own engine what to do.
>
> <page name="Food" specification-path="/Food.page">
> <mapping food/(.*)/(.*) Food?cat=$1&type=$2&addons=$3/>
> </page>
I'm pretty sure the Tapestry DTD won't allow for custom elements like
this. You'd need to pull the mappings out. Would you map different
URL's to the same .page? Or would it be one-to-one? If its one-to-one
you could put the URL mapping in the .page file itself as a <property>.
And the link component could ask the page to provide its URL even.
> This would lead to having a clean link like:
>
> /food/yyy/zzz
>
> instead of having a Tapestry link like:
>
> /app?service=page/Home?cat=xxx&type=yyy&addons=zzz
This part of what you are asking is quite trivial with a servlet
filter. Really, it is!
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by sa...@women-at-work.org.
Ok, my error. This is the way I would like to use it:
Within the html templates, everything stays the same...just a different
component:
<span jwcid"@MyLink" page="Food"/>
or maybe a new component with the same name, so you dont need to touch any
of the code that is already written:
<span jwcid"@ExternalLink" page="Food"/> or
<span jwcid"@DirectLink" page="Food"/>
the something.applicaton would define the mapping
that is usually in httpd.conf or within web.xml but
Tapestry specific to tell the own engine what to do.
<page name="Food" specification-path="/Food.page">
<mapping food/(.*)/(.*) Food?cat=$1&type=$2&addons=$3/>
</page>
This would lead to having a clean link like:
/food/yyy/zzz
instead of having a Tapestry link like:
/app?service=page/Home?cat=xxx&type=yyy&addons=zzz
>
> On Feb 25, 2005, at 5:19 AM, sarah.simbad@women-at-work.org wrote:
>
> >> Why do that? If you want to be clever about it, a filter could look
> >> up
> >> the page class and see if it is an instanceof IExternalPage. Would
> >> that be sufficient? What do you intend to do about query string
> >> parameters? Would you pass them through as-is or morph them?
> >
> > There would not be Query string parameters in the URL, as the Link
> > component
> > would automatically construct a clean url than contains al parameters,
> > e.g.
> > www.domain.com/food/pizza/salami
> >
> > would be mapped to lets say
> > www.domain.com/app?service=page/Food?cat=food&type=pizza&addons=salami
>
> Do you mean service=external here? And I presume you'd be hand-coding
> the extraction of those custom parameters in activateExternalPage?
>
> > The Link component would maybe look like that then:
> >
> > <span jwcid"@MyLink" page="Food"/>
> >
> > something.applicaton could maybe contain
> >
> > <page name="Food" specification-path="/Food.page">
> > <mapping food/(.*)/(.*) Food?cat=food&type=pizza&addons=salami/>
> > </page>
>
> What's the point in hard-coding parameters like this? Why not do this:
>
> <span jwcid="@MyLink" page="Food"
> parameters="ognl:{'cat':'food','type':'pizza','addons':'salami'"/>
>
> (assuming I've got my OGNL right, that is).
>
> Can you give us more real concrete examples?
>
> >> How much you do want to pay for these tweaks?! ;)
> > xxx dollars
>
> Want me to fill in the blanks?! ;)
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 25, 2005, at 5:19 AM, sarah.simbad@women-at-work.org wrote:
>> Why do that? If you want to be clever about it, a filter could look
>> up
>> the page class and see if it is an instanceof IExternalPage. Would
>> that be sufficient? What do you intend to do about query string
>> parameters? Would you pass them through as-is or morph them?
>
> There would not be Query string parameters in the URL, as the Link
> component
> would automatically construct a clean url than contains al parameters,
> e.g.
> www.domain.com/food/pizza/salami
>
> would be mapped to lets say
> www.domain.com/app?service=page/Food?cat=food&type=pizza&addons=salami
Do you mean service=external here? And I presume you'd be hand-coding
the extraction of those custom parameters in activateExternalPage?
> The Link component would maybe look like that then:
>
> <span jwcid"@MyLink" page="Food"/>
>
> something.applicaton could maybe contain
>
> <page name="Food" specification-path="/Food.page">
> <mapping food/(.*)/(.*) Food?cat=food&type=pizza&addons=salami/>
> </page>
What's the point in hard-coding parameters like this? Why not do this:
<span jwcid="@MyLink" page="Food"
parameters="ognl:{'cat':'food','type':'pizza','addons':'salami'"/>
(assuming I've got my OGNL right, that is).
Can you give us more real concrete examples?
>> How much you do want to pay for these tweaks?! ;)
> xxx dollars
Want me to fill in the blanks?! ;)
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by sa...@women-at-work.org.
> Why do that? If you want to be clever about it, a filter could look up
> the page class and see if it is an instanceof IExternalPage. Would
> that be sufficient? What do you intend to do about query string
> parameters? Would you pass them through as-is or morph them?
There would not be Query string parameters in the URL, as the Link component
would automatically construct a clean url than contains al parameters, e.g.
www.domain.com/food/pizza/salami
would be mapped to lets say
www.domain.com/app?service=page/Food?cat=food&type=pizza&addons=salami
The Link component would maybe look like that then:
<span jwcid"@MyLink" page="Food"/>
something.applicaton could maybe contain
<page name="Food" specification-path="/Food.page">
<mapping food/(.*)/(.*) Food?cat=food&type=pizza&addons=salami/>
</page>
> How much you do want to pay for these tweaks?! ;)
xxx dollars
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry project available for bidding
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 25, 2005, at 4:06 AM, sarah.simbad@women-at-work.org wrote:
> Thinking of placing a tapestry project on elance.com soon about the
> following:
>
> Integration of http://tuckey.org/urlrewrite/manual/ with Tapestry.
>
> So in the end you can do the following:
>
> - pages will generally be accessible at www.domain.com/page
This is exactly what the servlet filter I posted does.
> - specifying within the .application file which urls are mapped to an
> external page (using a regular expression)
Why do that? If you want to be clever about it, a filter could look up
the page class and see if it is an instanceof IExternalPage. Would
that be sufficient? What do you intend to do about query string
parameters? Would you pass them through as-is or morph them? Would
they be in the Tapestry-centric sp= way or in a custom way?
> - modify the Link components to link to the clean urls
Or make new custom Link components. Actually only one component is
probably needed, to replace PageLink that optionally could take either
an array or list (if you use sp= parameters) or a Map (if you want to
use named parameters). I'm not using any link components myself
because my sites are tiny and its just as sensible to me to have <a
href="/page">.
> Could not find any tapestry programmers on elance though :-(
How much you do want to pay for these tweaks?! ;)
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org