And what about a custom AssetDispatcher ? -----Message d'origine----- De : Andreas Pardeike [mailto:[EMAIL PROTECTED] Envoyé : vendredi 28 mars 2008 15:22 À : Tapestry users Objet : Re: T5: Custom asset locator?
Thanks Christope, but it's not quite what I want. To illustrate my problem, take a look at the request headers I want to process: GET /assets/i/test.gif HTTP/1.1 Host: www.SITE_A.com and GET /assets/i/test.gif HTTP/1.1 Host: www.SITE_B.com If I just create my own binding, the request urls would still contain the real folder inside /assets and my requests would look like GET /assets/SITE_A/i/test.gif HTTP/1.1 GET /assets/SITE_B/i/test.gif HTTP/1.1 which I rather not want. /Andreas On 28 mar 2008, at 15.10, Cordenier Christophe wrote: > Hello > > I'm not sure this can help, this is just an idea, > but maybe it would be easier to create a new type of binding Factory > upon the AssetBinding factory to add dynamic datas. > > Best regards, > Christophe. > > -----Message d'origine----- > De : Andreas Pardeike [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 28 mars 2008 14:58 > À : Tapestry users > Objet : T5: Custom asset locator? > > Hi everyone, > > First: many many thanks to the list for all the valuable info I > get from it (either as passive reading or answers to my questions!) > > My problem: I want to expand the virtual /assets mapping because > in the app I am writing, I use the current host name to run different > sites/layouts. > > So I want to implement that > > Host: www.SITE_A.com > <img src="${asset:classpath:/i/test.gif}" /> > points to SITE_A/i/test.gif > > and > > Host: www.SITE_B.com > <img src="${asset:classpath:/i/test.gif}" /> > points to SITE_B/i/test.gif > > instead of the default way to do it by using > > <img src="${asset:classpath:/CURRENTSITE/i/test.gif}" /> > or @Path("classpath:${host}/i/test.gif") > > and have it dynamically expand to the same paths. The motivation > behind > this is that > > a) users at SITE_A could replace the url with 'SITE_B' and peek at > other > resources > > b) the url's get very long and for some reason I don't want to go into > here, I need to match the URLs style with some dynamic paths that > fetch resources from a db - there, I automatically take care of the > host name. > > I couldn't find a example on how to expand/overwrite asset lookup (in > the same way I expanded template lookup). All I want is to add a > subfolder on the fly to the asset path and still use the same build > in asset service. > > /Andreas Pardeike > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > Ce message et les pièces jointes sont confidentiels et réservés à > l'usage exclusif de ses destinataires. Il peut également être > protégé par le secret professionnel. Si vous recevez ce message par > erreur, merci d'en avertir immédiatement l'expéditeur et de le > détruire. L'intégrité du message ne pouvant être assurée sur > Internet, la responsabilité du groupe Atos Origin ne pourra être > recherchée quant au contenu de ce message. Bien que les meilleurs > efforts soient faits pour maintenir cette transmission exempte de > tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa > responsabilité ne saurait être recherchée pour tout dommage > résultant d'un virus transmis. > > This e-mail and the documents attached are confidential and intended > solely for the addressee; it may also be privileged. If you receive > this e-mail in error, please notify the sender immediately and > destroy it. As its integrity cannot be secured on the Internet, the > Atos Origin group liability cannot be triggered for the message > content. Although the sender endeavours to maintain a computer virus- > free network, the sender does not warrant that this transmission is > virus-free and will not be liable for any damages resulting from any > virus transmitted. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]