Re: Cocoon 3.0 components

2013-06-19 Thread Francesco Chicchiriccò

On 19/06/2013 22:06, gelo1234 wrote:

I wonder if C2.2 flowscript request object can be followed here in C3:
http://cocoon.apache.org/2.2/blocks/flowscript/1.0/1383_1_1.html


Flowscript is not available in C3.

and we can use something like: {jexl:cocoon.request.serverName} or 
{jext:cocoon.request.header.host} ?


Is any info available about C3 request object ?


Basically, you can use JEXL [1] access to HttpServletRequest methods; 
some examples:


{jexl:cocoon.request.contextPath} -> HttpServletRequest#getContextPath()

{jexl:cocoon.request.myparam} -> HttpServletRequest#getParameter("myparam")

{jexl:cocoon.request.locale.language} -> 
HttpServletRequest#getLocale()#getLanguage()


HTH
Regards.

[1] http://commons.apache.org/proper/commons-jexl/reference/syntax.html

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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



Re: Sample sitemap.xmap war

2013-06-19 Thread gelo1234
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:



  

  

  

Greetings,
Greg


2013/6/19 gelo1234 

> 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:/mywebapp-1.0-SNAPSHOT/test1/1.xml
> http://localhost:/mywebapp-1.0-SNAPSHOT/test1/test2/1.xml
> http://localhost:/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  but in C3 it seems like its
> missing.
>
> Greetings,
> Greg
>
>
>
> 2013/5/11 Francesco Chicchiriccò 
>
>>  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 
>>
>>>  Thanks, that clarifies a bit my scenario.
>>>
>>> 2013/5/10 Francesco Chicchiriccò 
>>>
 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

2013-06-19 Thread gelo1234
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:/mywebapp-1.0-SNAPSHOT/test1/1.xml
http://localhost:/mywebapp-1.0-SNAPSHOT/test1/test2/1.xml
http://localhost:/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  but in C3 it seems like its missing.

Greetings,
Greg



2013/5/11 Francesco Chicchiriccò 

>  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 
>
>>  Thanks, that clarifies a bit my scenario.
>>
>> 2013/5/10 Francesco Chicchiriccò 
>>
>>> 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: Cocoon 3.0 components

2013-06-19 Thread gelo1234
I wonder if C2.2 flowscript request object can be followed here in C3:
http://cocoon.apache.org/2.2/blocks/flowscript/1.0/1383_1_1.html

and we can use something like: {jexl:cocoon.request.serverName} or
{jext:cocoon.request.header.host} ?

Is any info available about C3 request object ?

-Greg


2013/6/19 gelo1234 

> Sorry for the mistyping: s/cutom/custom.
>
> One more question: I saw  in examples sitemap.xmap under
> 
> Is it possible to put  straight under  ?
> And what param? to use to select hostname of the incoming Request ?
>
>  ?
>
> In 2.1 there was a HostSelector:
> http://cocoon.apache.org/2.1/userdocs/selectors.html
> How to code that in C3 ?
>
> Greetings,
> Greg
>
>
>
> 2013/6/19 gelo1234 
>
>>
>> Hi all,
>>
>> I wonder if C3 still supports:
>>
>> 1. matchers in sitemap.xmap ?
>>
>> e.g.
>> 
>> > name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
>> > name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
>>
>> 2. selectors in sitemap.xmap ?
>>
>> e.g.
>> 
>> > name="browser" src="org.apache.cocoon.selection.BrowserSelector">
>>
>>
>> 3. Is it possible to define cutom matchers/selectors ? Any examples ?
>>
>> 4. actions in sitemap.xmap ?
>>
>> e.g.
>> 
>> > name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
>>
>>
>> 5. ?
>>
>>
>> I've got Cocoon site that hosts multiple www domains, all based on the
>> same sitemap.xmap with > check-reload="yes"/>
>>
>> so the configuration is as follows:
>>
>> 
>>   
>>
>> > check-reload="yes"/>
>>
>>
>>  > check-reload="yes"/>
>>
>>
>> 
>>
>> Is it still possible with C3 ? Or should I use some separate blocks
>> config ?
>> The problem with separate blocks config is that I want to use empty URI
>> (not different) for each site
>>
>> So
>> site1: http://www.domainA.org/
>> site2: http://www.domainB.org/
>>
>> NOT
>>
>> http://www.some.org/domainA/
>> http://www.some.org/domainB/
>>
>> under one C3 war (sitemap.xmap config). And I would like to have a common
>> block accessible from each site.
>>
>> Greetings,
>> Greg
>>
>
>


Re: Cocoon 3.0 components

2013-06-19 Thread gelo1234
Sorry for the mistyping: s/cutom/custom.

One more question: I saw  in examples sitemap.xmap under

Is it possible to put  straight under  ?
And what param? to use to select hostname of the incoming Request ?

 ?

In 2.1 there was a HostSelector:
http://cocoon.apache.org/2.1/userdocs/selectors.html
How to code that in C3 ?

Greetings,
Greg



2013/6/19 gelo1234 

>
> Hi all,
>
> I wonder if C3 still supports:
>
> 1. matchers in sitemap.xmap ?
>
> e.g.
> 
>  name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
>  name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
>
> 2. selectors in sitemap.xmap ?
>
> e.g.
> 
>  name="browser" src="org.apache.cocoon.selection.BrowserSelector">
>
>
> 3. Is it possible to define cutom matchers/selectors ? Any examples ?
>
> 4. actions in sitemap.xmap ?
>
> e.g.
> 
>  name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
>
>
> 5. ?
>
>
> I've got Cocoon site that hosts multiple www domains, all based on the
> same sitemap.xmap with  check-reload="yes"/>
>
> so the configuration is as follows:
>
> 
>   
>
>  check-reload="yes"/>
>
>
>   check-reload="yes"/>
>
>
> 
>
> Is it still possible with C3 ? Or should I use some separate blocks config
> ?
> The problem with separate blocks config is that I want to use empty URI
> (not different) for each site
>
> So
> site1: http://www.domainA.org/
> site2: http://www.domainB.org/
>
> NOT
>
> http://www.some.org/domainA/
> http://www.some.org/domainB/
>
> under one C3 war (sitemap.xmap config). And I would like to have a common
> block accessible from each site.
>
> Greetings,
> Greg
>


Cocoon 3.0 components

2013-06-19 Thread gelo1234
Hi all,

I wonder if C3 still supports:

1. matchers in sitemap.xmap ?

e.g.




2. selectors in sitemap.xmap ?

e.g.




3. Is it possible to define cutom matchers/selectors ? Any examples ?

4. actions in sitemap.xmap ?

e.g.




5. ?


I've got Cocoon site that hosts multiple www domains, all based on the same
sitemap.xmap with 

so the configuration is as follows:


  
   

   
   
 
   
   


Is it still possible with C3 ? Or should I use some separate blocks config
?
The problem with separate blocks config is that I want to use empty URI
(not different) for each site

So
site1: http://www.domainA.org/
site2: http://www.domainB.org/

NOT

http://www.some.org/domainA/
http://www.some.org/domainB/

under one C3 war (sitemap.xmap config). And I would like to have a common
block accessible from each site.

Greetings,
Greg


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Mansour Al Akeel
Perfect.
Thank you a lot, everyone.




On Wed, Jun 19, 2013 at 11:37 AM, Jos Snellings  wrote:

> Replying to my own:
>
> 
>
> 
> 
>
> That should work if you include cocoon-optional in your dependencies.
>
> Cheers,
> Jos
>
>
>
>
> On Wed, Jun 19, 2013 at 5:29 PM, Jos Snellings <
> jos.snelli...@upperware.biz> wrote:
>
>> Hi Mansour,
>>
>> Try:
>> 
>>   
>> 
>>
>>
>>
>>
>>
>> On Wed, Jun 19, 2013 at 5:14 PM, Mansour Al Akeel <
>> mansour.alak...@gmail.com> wrote:
>>
>>> sorry, my fault. I didn't tell the version.
>>> I am using C3.0
>>>
>>>
>>>
>>> On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma 
>>> wrote:
>>>
 try this

 >>>  src="org.apache.cocoon.serialization.XMLSerializer">
  UTF-8
 true
  



 On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy <
 joelmcconau...@gmail.com> wrote:

> Try this...
>
>   src="org.apache.cocoon.serialization.XMLSerializer">
>  UTF-8
> true
>  
>
>
>
> On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel <
> mansour.alak...@gmail.com> wrote:
>
>> How do I remove the xml declaration and doctype from xml and html
>> serializes ??
>>
>>
>
>
> --
> Joel McConaughy
> 206-300-4732
> joelmcconau...@gmail.com
>



 --
 *Thanks with regards
 *
 *Bhavya Sharma*
 निष्काम

>>>
>>>
>>
>>
>> --
>> We should be careful to get out of an experience only the wisdom that is
>> in it - and stay there, lest we be like the cat that sits down on a hot
>> stove-lid.  She will never sit down on a hot stove-lid again - and that
>> is well; but also she will never sit down on a cold one any more.
>> -- Mark Twain
>>  
>>
>
>
>
> --
> We should be careful to get out of an experience only the wisdom that is
> in it - and stay there, lest we be like the cat that sits down on a hot
> stove-lid.  She will never sit down on a hot stove-lid again - and that
> is well; but also she will never sit down on a cold one any more.
> -- Mark Twain
>  
>


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Jos Snellings
Replying to my own:





That should work if you include cocoon-optional in your dependencies.

Cheers,
Jos




On Wed, Jun 19, 2013 at 5:29 PM, Jos Snellings
wrote:

> Hi Mansour,
>
> Try:
> 
>   
> 
>
>
>
>
>
> On Wed, Jun 19, 2013 at 5:14 PM, Mansour Al Akeel <
> mansour.alak...@gmail.com> wrote:
>
>> sorry, my fault. I didn't tell the version.
>> I am using C3.0
>>
>>
>>
>> On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma 
>> wrote:
>>
>>> try this
>>>
>>> >>  src="org.apache.cocoon.serialization.XMLSerializer">
>>>  UTF-8
>>> true
>>>  
>>>
>>>
>>>
>>> On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy <
>>> joelmcconau...@gmail.com> wrote:
>>>
 Try this...

 >>>  src="org.apache.cocoon.serialization.XMLSerializer">
  UTF-8
 true
  



 On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel <
 mansour.alak...@gmail.com> wrote:

> How do I remove the xml declaration and doctype from xml and html
> serializes ??
>
>


 --
 Joel McConaughy
 206-300-4732
 joelmcconau...@gmail.com

>>>
>>>
>>>
>>> --
>>> *Thanks with regards
>>> *
>>> *Bhavya Sharma*
>>> निष्काम
>>>
>>
>>
>
>
> --
> We should be careful to get out of an experience only the wisdom that is
> in it - and stay there, lest we be like the cat that sits down on a hot
> stove-lid.  She will never sit down on a hot stove-lid again - and that
> is well; but also she will never sit down on a cold one any more.
> -- Mark Twain
>  
>



-- 
We should be careful to get out of an experience only the wisdom that is
in it - and stay there, lest we be like the cat that sits down on a hot
stove-lid.  She will never sit down on a hot stove-lid again - and that
is well; but also she will never sit down on a cold one any more.
-- Mark Twain
 


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Jos Snellings
Hi Mansour,

Try:

  






On Wed, Jun 19, 2013 at 5:14 PM, Mansour Al Akeel  wrote:

> sorry, my fault. I didn't tell the version.
> I am using C3.0
>
>
>
> On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma wrote:
>
>> try this
>>
>> >  src="org.apache.cocoon.serialization.XMLSerializer">
>>  UTF-8
>> true
>>  
>>
>>
>>
>> On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy <
>> joelmcconau...@gmail.com> wrote:
>>
>>> Try this...
>>>
>>> >>  src="org.apache.cocoon.serialization.XMLSerializer">
>>>  UTF-8
>>> true
>>>  
>>>
>>>
>>>
>>> On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel <
>>> mansour.alak...@gmail.com> wrote:
>>>
 How do I remove the xml declaration and doctype from xml and html
 serializes ??


>>>
>>>
>>> --
>>> Joel McConaughy
>>> 206-300-4732
>>> joelmcconau...@gmail.com
>>>
>>
>>
>>
>> --
>> *Thanks with regards
>> *
>> *Bhavya Sharma*
>> निष्काम
>>
>
>


-- 
We should be careful to get out of an experience only the wisdom that is
in it - and stay there, lest we be like the cat that sits down on a hot
stove-lid.  She will never sit down on a hot stove-lid again - and that
is well; but also she will never sit down on a cold one any more.
-- Mark Twain
 


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Mansour Al Akeel
sorry, my fault. I didn't tell the version.
I am using C3.0



On Wed, Jun 19, 2013 at 11:05 AM, Bhavya Sharma wrote:

> try this
>
>  src="org.apache.cocoon.serialization.XMLSerializer">
>  UTF-8
> true
>  
>
>
>
> On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy  > wrote:
>
>> Try this...
>>
>> >  src="org.apache.cocoon.serialization.XMLSerializer">
>>  UTF-8
>> true
>>  
>>
>>
>>
>> On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel <
>> mansour.alak...@gmail.com> wrote:
>>
>>> How do I remove the xml declaration and doctype from xml and html
>>> serializes ??
>>>
>>>
>>
>>
>> --
>> Joel McConaughy
>> 206-300-4732
>> joelmcconau...@gmail.com
>>
>
>
>
> --
> *Thanks with regards
> *
> *Bhavya Sharma*
> निष्काम
>


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Bhavya Sharma
try this


 UTF-8
true
 



On Wed, Jun 19, 2013 at 8:33 PM, Joel McConaughy
wrote:

> Try this...
>
>  src="org.apache.cocoon.serialization.XMLSerializer">
>  UTF-8
> true
>  
>
>
>
> On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel <
> mansour.alak...@gmail.com> wrote:
>
>> How do I remove the xml declaration and doctype from xml and html
>> serializes ??
>>
>>
>
>
> --
> Joel McConaughy
> 206-300-4732
> joelmcconau...@gmail.com
>



-- 
*Thanks with regards
*
*Bhavya Sharma*
निष्काम


Re: Remove XML declaration and html DOCTYPE

2013-06-19 Thread Joel McConaughy
Try this...


UTF-8
true




On Wed, Jun 19, 2013 at 7:53 AM, Mansour Al Akeel  wrote:

> How do I remove the xml declaration and doctype from xml and html
> serializes ??
>
>


-- 
Joel McConaughy
206-300-4732
joelmcconau...@gmail.com


Remove XML declaration and html DOCTYPE

2013-06-19 Thread Mansour Al Akeel
How do I remove the xml declaration and doctype from xml and html
serializes ??