You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gelo1234 <ge...@gmail.com> on 2013/06/19 23:15:31 UTC

Re: Sample sitemap.xmap war

Thanks Francesco. It works perfectly! The only thing i had to add is cocoon
snapshot repository to pom.xml.

Now I wonder how (without blocks) I should use subsequent URI paths

like:
http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/1.xml
http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/test2/1.xml
http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/test2/test3/1.xml

I would like to have a separate sitemap.xmap for each /test1, /test1/test2
and /test1/test2/test3 context ?
Is it possible WITHOUT blocks ?

In old Cocoon there was <map:mount ...> but in C3 it seems like its missing.

Greetings,
Greg



2013/5/11 Francesco Chicchiriccò <il...@apache.org>

>  Il 10/05/2013 19:18, gelo1234 ha scritto:
>
>   I have followed the servlet-service config you mentioned but still no
> luck. I attach my war file here.
>  Deployed to Tomcat 7 from web app module + c3 libs added to WEB-INF/lib
> and it does NOT work.
>
> Can you point where the error is ?
>
>  Accessing: http://localhost:8080/mywebapp-1.0-SNAPSHOT/test.xml
>  gives me XML error :(
>
>
> The WAR file attached is missing *a lot* of dependencies.
>
> I have added a branch to my empty C3 project on github [1]: see
> instructions there about how to build and run; you can, of course, deploy
> it to an external Tomcat 7 container.
>
> HTH
> Regards.
>
> [1] https://github.com/ilgrosso/cocoon3EmptyProject/tree/SINGLE_WAR
>
>   2013/5/10 gelo1234 <ge...@gmail.com>
>
>>  Thanks, that clarifies a bit my scenario.
>>
>> 2013/5/10 Francesco Chicchiriccò <il...@apache.org>
>>
>>> On 10/05/2013 15:52, gelo1234 wrote:
>>>
>>>> Yes, I just want a single block (or none?:) with a sitemap.xmap which
>>>> is packaged as a war module and can be deployed to Tomcat 7.
>>>>
>>>
>>>  With single block, you need the classic multi-module structure (parent
>>> + block module + webapp module).
>>>
>>> With no blocks you can take the example I've provided in my previous
>>> e-mail: I am using something similar in several production environments and
>>> it works like a charm.
>>>
>>> Regards.
>>>
>>     --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/
>
>

Re: Sample sitemap.xmap war

Posted by gelo1234 <ge...@gmail.com>.
Nevermind my question. I digged a bit with code and found out It IS
possible. It just requires defining new bean in Spring.
Actually the bean name doesn't matter:

<bean name="test1" class="org.apache.cocoon.servlet.XMLSitemapServlet">
    <servlet:context mount-path="/test1"
context-path="classpath:/classes/COB-INF/test1"/>
  </bean>

  <bean name="test2" class="org.apache.cocoon.servlet.XMLSitemapServlet">
    <servlet:context mount-path="/test1/test2"
context-path="classpath:/classes/COB-INF/test2"/>
  </bean>

Greetings,
Greg


2013/6/19 gelo1234 <ge...@gmail.com>

> Thanks Francesco. It works perfectly! The only thing i had to add is
> cocoon snapshot repository to pom.xml.
>
> Now I wonder how (without blocks) I should use subsequent URI paths
>
> like:
> http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/1.xml
> http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/test2/1.xml
> http://localhost:8888/mywebapp-1.0-SNAPSHOT/test1/test2/test3/1.xml
>
> I would like to have a separate sitemap.xmap for each /test1, /test1/test2
> and /test1/test2/test3 context ?
> Is it possible WITHOUT blocks ?
>
> In old Cocoon there was <map:mount ...> but in C3 it seems like its
> missing.
>
> Greetings,
> Greg
>
>
>
> 2013/5/11 Francesco Chicchiriccò <il...@apache.org>
>
>>  Il 10/05/2013 19:18, gelo1234 ha scritto:
>>
>>   I have followed the servlet-service config you mentioned but still no
>> luck. I attach my war file here.
>>  Deployed to Tomcat 7 from web app module + c3 libs added to WEB-INF/lib
>> and it does NOT work.
>>
>> Can you point where the error is ?
>>
>>  Accessing: http://localhost:8080/mywebapp-1.0-SNAPSHOT/test.xml
>>  gives me XML error :(
>>
>>
>> The WAR file attached is missing *a lot* of dependencies.
>>
>> I have added a branch to my empty C3 project on github [1]: see
>> instructions there about how to build and run; you can, of course, deploy
>> it to an external Tomcat 7 container.
>>
>> HTH
>> Regards.
>>
>> [1] https://github.com/ilgrosso/cocoon3EmptyProject/tree/SINGLE_WAR
>>
>>   2013/5/10 gelo1234 <ge...@gmail.com>
>>
>>>  Thanks, that clarifies a bit my scenario.
>>>
>>> 2013/5/10 Francesco Chicchiriccò <il...@apache.org>
>>>
>>>> On 10/05/2013 15:52, gelo1234 wrote:
>>>>
>>>>> Yes, I just want a single block (or none?:) with a sitemap.xmap which
>>>>> is packaged as a war module and can be deployed to Tomcat 7.
>>>>>
>>>>
>>>>  With single block, you need the classic multi-module structure (parent
>>>> + block module + webapp module).
>>>>
>>>> With no blocks you can take the example I've provided in my previous
>>>> e-mail: I am using something similar in several production environments and
>>>> it works like a charm.
>>>>
>>>> Regards.
>>>>
>>>     --
>> Francesco Chicchiriccò
>>
>> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/
>>
>>
>