cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <baskar.gan...@wipro.com>
Subject RE: Appending URI prefix in cocoon.2.1.7
Date Thu, 23 Mar 2006 14:06:17 GMT

Thanks a lot Jason for considering this.

Here in {customer/name} customer is the object and the name is a
variable in it which will be stored at the beginning using the filters
before it reaches the xmap.
The following is defined in the cocoon.xconf to make the customer object
available :-
    <component-instance
class="org.apache.cocoon.components.modules.input.JXPathMetaModule"
logger="core.modules.input" name="customer">
      <input-module name="sessattr"/>
      <parameter>customer</parameter>
      <from-parameter>customer</from-parameter>
    </component-instance>

<component-instance
class="org.apache.cocoon.components.modules.output.SessionAttributeOutpu
tModule" logger="core.modules.output" name="sessattr"/>

As a child of <output-modules>

With respect to sitemap.xmap we have the following declaration :-

<map:generator name="sessattr" label="content"
src="org.apache.cocoon.generation.SessionAttributeGenerator" />


Basically the {customer/name} will have a customer name say "customer1".

Please tell me if you want more information.

Thanks,
Baskar


-----Original Message-----
From: Jason Johnston [mailto:cocoon@lojjic.net]
Sent: Wednesday, March 22, 2006 7:33 PM
To: users@cocoon.apache.org
Subject: Re: Appending URI prefix in cocoon.2.1.7

Hello Baskar,

I'm sorry but I don't understand your question. In your examples what is
{customer/name} supposed to represent?


baskar.ganesh@wipro.com wrote:
> 
>
> Hi All,
>
> 
>
> I am trying to add a static name other than the war name in the URI.
>
> It should be as follows:-
>
> 
>
> *http://<server-name>:<port-number>/<webapp-name>/<customer-name>*
>
> * *
>
> And the above should be there always whenever the new request is been
> served.
>
> 
>
> I am using cocoon2.1.7 and I use two xmaps sitemap.xmap and
dynamicmap.xmap.
>
> Whenever it comes to sitemap.xmap I need to route it to
dynamicmap.xmap
> where my project specific pipelines are in place.
>
> I am using the following match for routing the request from
sitemap.xmap
> to dynamicmap.xmap
>
> 
>
>     <map:match pattern="**">
>
>       <map:mount uri-prefix="" check-reload="yes"
>
>                  src="customer.xmap"/>
>
>     </map:match>
>
> 
>
> It was working fine.
>
> Now I am trying to add the customer name to the URI
>
> And I tried the following
>
> 
>
>     <map:match pattern="**">
>
>       <map:mount uri-prefix="{customer/name}" check-reload="yes"
>
>                  src="customer.xmap"/>
>
>     </map:match>
>
> 
>
> It is not matching Am I miss something.
>
> Any other suggestions where I can route the request with the customer
name.
>
> 
>
> *_Note :-_*
>
> 
>
> The following matches on sitemap.xmap made this possible on
cocoon2.1.5
> version
>
> 
>
>     <map:match pattern="">
>
>       <!-- TODO: security check here -->
>
>       <map:redirect-to uri="{customer/name}/" />
>
>     </map:match>
>
> 
>
>     <map:match pattern="{customer/name}">
>
>       <map:redirect-to uri="{0}/" />
>
>     </map:match>
>
> 
>
>     <map:match pattern="{customer/name}/**">
>
>       <map:mount uri-prefix="{customer/name}" check-reload="yes"
>
>                  src=" dynamicmap.xmap"/>
>
>     </map:match>
>
> 
>
>     <map:match pattern="*">
>
>       <map:redirect-to uri="{customer/name}/" />
>
>     </map:match>
>
>     <map:match pattern="*/**">
>
>       <map:redirect-to uri="/webapp/{customer/name}/" />
>
>     </map:match>
>
> 
>
> 
>
> Please give me some suggestion so that I can try out.
>
> 
>
> 
>
> Thanks and Regards,
>
> Baskar
>
> 
>
> 
>
> 
>
>
> The information contained in this electronic message and any
attachments
> to this message are intended for the exclusive use of the addressee(s)
> and may contain proprietary, confidential or privileged information.
If
> you are not the intended recipient, you should not disseminate,
> distribute or copy this e-mail. Please notify the sender immediately
and
> destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain proprietary, confidential
or privileged information. If you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and destroy all copies
of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message