How to parse and map URLs?

2009-03-26 Thread dpark

I'm looking for any suggestions on the below:

Business Need:
A new partner client would like to leverage our current web application but
allow for some dynamic rebranding (through images).

The application will know which brand images to show based on the format of
the URL.

For example, given the following current request A:
http://domain.com/Login.page

How can I also map the following request B, to go to the exact same page?
http://domain.com/partner/Login.page

(presumably, whatever is going to be parsing the URL will set some sort of
brand context in a session object so that assets can then query it to know
what to show)

Is this a job for a custom Service Encoder (friendly URL)?

Any suggestions are welcome...
(sadly, i think i'll be able to hear a pin drop...)

DP

-- 
View this message in context: 
http://www.nabble.com/How-to-parse-and-map-URLs--tp22730051p22730051.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



Re: How to parse and map URLs?

2009-03-26 Thread Michael Prescott
This probably won't help you, but have a look at URLRewriter (
http://tuckey.org/urlrewrite/), which is a filter that does URL rewriting.
I'm not sure if you can extend it with the sort of 'manipulate the context'
behavior you're looking for, but perhaps.

The context you're manipulating, by the way, could be a Spring bean with
session scope.

But I don't know enough to help you avoid having to list asset and
asset_partner and asset_partner2 in each component that uses an asset -
that would be massively annoying.

Michael

On Thu, Mar 26, 2009 at 4:04 PM, dpark dp...@exchangesolutions.com wrote:


 I'm looking for any suggestions on the below:

 Business Need:
 A new partner client would like to leverage our current web application but
 allow for some dynamic rebranding (through images).

 The application will know which brand images to show based on the format of
 the URL.

 For example, given the following current request A:
 http://domain.com/Login.page

 How can I also map the following request B, to go to the exact same page?
 http://domain.com/partner/Login.page

 (presumably, whatever is going to be parsing the URL will set some sort of
 brand context in a session object so that assets can then query it to know
 what to show)

 Is this a job for a custom Service Encoder (friendly URL)?

 Any suggestions are welcome...
 (sadly, i think i'll be able to hear a pin drop...)

 DP

 --
 View this message in context:
 http://www.nabble.com/How-to-parse-and-map-URLs--tp22730051p22730051.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




Re: How to parse and map URLs?

2009-03-26 Thread Geoffrey Wiseman
On Thu, Mar 26, 2009 at 4:04 PM, dpark dp...@exchangesolutions.com wrote:


 Is this a job for a custom Service Encoder (friendly URL)?


This is presumably Tapestry 4.X, based on this reference (and past Exchange
Solutions experience)?

My guess is that you're better off with something like URLRewriter or, if
you're using Apache in front, doing some rewriting there.  A quick look at
Service Encoder makes it look like it'd be somewhat painful to accomplish
what you're looking for.  (Although someone with more ServiceEncoder
experience can feel free to contradict me).

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/


Re: How to parse and map URLs?

2009-03-26 Thread Howard Lewis Ship
Thiago has checked some code into 5.1.0.2 that gives you greater
control over how URLs are generated and interpreted.

On Thu, Mar 26, 2009 at 2:17 PM, Geoffrey Wiseman
geoffrey.wise...@gmail.com wrote:
 On Thu, Mar 26, 2009 at 4:04 PM, dpark dp...@exchangesolutions.com wrote:


 Is this a job for a custom Service Encoder (friendly URL)?


 This is presumably Tapestry 4.X, based on this reference (and past Exchange
 Solutions experience)?

 My guess is that you're better off with something like URLRewriter or, if
 you're using Apache in front, doing some rewriting there.  A quick look at
 Service Encoder makes it look like it'd be somewhat painful to accomplish
 what you're looking for.  (Although someone with more ServiceEncoder
 experience can feel free to contradict me).

  - Geoffrey
 --
 Geoffrey Wiseman
 http://www.geoffreywiseman.ca/




-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: How to parse and map URLs?

2009-03-26 Thread Fernando Padilla
i think we had a discussion on the mailing list a bit back, I think we 
were refering to it as virtual hosting.


Michael Prescott wrote:

This probably won't help you, but have a look at URLRewriter (
http://tuckey.org/urlrewrite/), which is a filter that does URL rewriting.
I'm not sure if you can extend it with the sort of 'manipulate the context'
behavior you're looking for, but perhaps.

The context you're manipulating, by the way, could be a Spring bean with
session scope.

But I don't know enough to help you avoid having to list asset and
asset_partner and asset_partner2 in each component that uses an asset -
that would be massively annoying.

Michael

On Thu, Mar 26, 2009 at 4:04 PM, dpark dp...@exchangesolutions.com wrote:


I'm looking for any suggestions on the below:

Business Need:
A new partner client would like to leverage our current web application but
allow for some dynamic rebranding (through images).

The application will know which brand images to show based on the format of
the URL.

For example, given the following current request A:
http://domain.com/Login.page

How can I also map the following request B, to go to the exact same page?
http://domain.com/partner/Login.page

(presumably, whatever is going to be parsing the URL will set some sort of
brand context in a session object so that assets can then query it to know
what to show)

Is this a job for a custom Service Encoder (friendly URL)?

Any suggestions are welcome...
(sadly, i think i'll be able to hear a pin drop...)

DP

--
View this message in context:
http://www.nabble.com/How-to-parse-and-map-URLs--tp22730051p22730051.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