cocoon-3.0 : request and sitemap parameters

2009-06-10 Thread Jos Snellings
Hi,

I could not figure out how to access request and sitemap parameters from
a Cocoon 3 generator.
The generator is part of a pipeline:

public class StuffGenerator extends AbstractGenerator  implements
CachingPipelineComponent {

String language = en;


The pipeline:


 map:match pattern=stuff/{language}
map:generate type=stuff language={map:language}
  map:parameter name=lang value=map:language/
/map:generate
map:transform src=presentation/showstuff.xslt/ 
map:serialize type=xhtml /
  /map:match

There surely is an easy way, but I must overlook it.
Any suggestions?

Thank you so much,
Jos Snellings


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



classpath elements ...

2009-08-31 Thread Jos Snellings
Hi,

The documentation is a little unclear here:
are 
CLASSPATH_SPRING_CONFIGURATION_LOCATION
(classpath*:META-INF/cocoon/spring)
GLOBAL_PROPERTIES_LOCATION(/WEB-INF/cocoon/properties)
GLOBAL_SPRING_CONFIGURATION_LOCATION(/WEB-INF/cocoon/spring)  

configurable?
This could be necessary if one is packaging cocoon for a different
environment.
There is a problem as to where cocoon is picking up its spring
definitions.
I am currently missing a document explaining how to package cocoon for
Tomcat, for ...
With a little help I could write it.

Thanks for a couple of hints. 

Jos


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



settings.properties: no me gusta.

2009-09-01 Thread Jos Snellings
Hi,

Quick question:
According to
http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/2.0/1310_1_1.html
the spring configurator looks in different places for properties files.
How can I restrain the spring configurator from looking in place 7,
 $HOME/.cocoon/settings.properties

Is this configurable?

Thanks,
Jos



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



Re: xml2pgsql with cocoon?

2009-09-07 Thread Jos Snellings
Hello Mika,

In your description you mention a maintenance task: data uploading and
conversion: you need to parse XML data and insert extracted entities
(polygons, ids) in a database. You do not need cocoon to do that.
I would use SAX and simply JDBC.
How do you represent your GIS-data for the users of your site?

Kind regards,
Jos


On Mon, 2009-09-07 at 18:58 +0300, Mika Lehtonen wrote:
 Hello Cocooners!
 
 I have a little project going on with the following brief description. I 
 was just wondering whether this be something that would be feasible to 
 implement with Cocoon.
 
 I have a XML schema and a Postgresql (PostGIS) table structure which fit 
 together, at least as much as possible. What I would like to accomplish is:
 
 1) Upload a XML-file (Actually GML) into my server.
 2) Optionally validate it against the schema.
 3) Populate the Postgresql database with the data of that uploaded GML.
 4) Populate PostGIS columns of the database with the geometries in that 
 GML-file.
 
 And someday I might want to do the same other way round, that is, save a 
 valid GML out of the Postgresql/PostGIS database.
 
 
 Any hints/ideas are most welcome. And maybe I am just trying to 
 re-invent a wheel again. If you know some framework/software which 
 already does this, please share your knowledge.
 
 With best regards,
 Mika Lehtonen
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 


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



Re: Starting out with Cocoon 2.2

2009-09-10 Thread Jos Snellings
Hi,

Recognizing the feeling of disconcertation when after having worked with
Cocoon 2.1 one comes back and finds out about Cocoon 2.2.

- many things have changed, (striving towards MVC paradigm)
  which is OK, if things are improving

- Cocoon still depends on Avalon (which caused me troubles in the past)

- and most important: Maven is very powerful and practical, I was
impressed by just having to download the artifacts and after two magical
lines I have an eclipse project and a running sample. It hides lots of
complexity and that is at times its biggest danger. Suppose you consider
Cocoon for a product or project, then you would want to know what you
are doing, what you need to include and where it is all coming from.
Making your own distribution is not for the faint of heart.


Now coming back after a few months I was quite surprised in the positive
sense by Cocoon 3:

- only the spring dependency would remain, allowing architechts to
really start considering cocoon as part of a solution
- architecture evolving nicely towards REST, whilst keeping the good and
powerful part: the sitemap and the pipelines.

Yep, this is what I was waiting for.

The most important objection that remains is documentation. As an
execise I tried to package Cocoon-3 differently, without 'Reloading
Class Loader', and it turned out a difficult exercise. Tampering a bit
with the architecture is always a good exercise when you want to
evaluate an upcoming product. It gives you right an answer to the
question how modular is it really?. Maybe I could drop a line in the
documentation about that, when the wiki is reorganised.

Best,
Jos 




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



Re: accessing java tier functionality in Cocoon

2009-09-29 Thread Jos Snellings
Hi Paul,

Classes that live in a Cocoon environment will typically send their
output via SAX events. They would take a ContentHandler or
XMLConsumer as a parameter and call
startElement/endElement/characters. 
There might exist an insulation layer between the SAX-world and the
objects properly.

If you extend these classes with methods that return objects, and arrays
of objects, they become available to other Views.

Does this answer make sense to you?

Best,
Jos

On Tue, 2009-09-29 at 06:33 -0400, Paul Joseph wrote:
 Hi there,
 
 What is the best way to make business functionality available in the 
 Java tier of my Cocoon application available available to another 
 application written in say ASP?
 
 Is sharing Cocoon applications java tier functionality with other apps. 
 possible and are there any easy ways to do this?
 
 thx.
 Paul
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 


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



Re: accessing java tier functionality in Cocoon

2009-09-29 Thread Jos Snellings
Here is a snippet ... this is a method from an object
ThesaurusBrowser. The method searches a number of terms from the
thesaurus, that, say, start with a given substring: 

public void searchTerms(ContentHandler ch, byte[] nb, String language,
String smode, boolean nonpreferred)
{
AttributesImpl attr = new AttributesImpl();
int hits = 0;
ResultSet rs = null;
// here we are going to form a query and execute it. 
rs = p.executeQuery();
ResultSetMetaData rsmd = rs.getMetaData();

while (rs.next()) {
hits++;

attr.addAttribute(,id,id,CDATA,rs.getString(id));
if (nonpreferred)
attr.addAttribute(,npt,npt,CDATA,1);
ch.startElement(,term,term,attr);
attr.clear();
for (int i=1; i = rsmd.getColumnCount(); i++) {
String tagname = rsmd.getColumnName(i);
ch.startElement(,tagname,tagname,attr);
String value = rs.getString(i);
if (value != null)
ch.characters(value.toCharArray(),0,value.length());
ch.endElement(,tagname,tagname);
}
ch.endElement(,term,term);
}

rs.close();
p.close();
}

I just display the relevant part: This code produces XML
term id=234 term=someterm context=somecontext nonPreferred=0/
...
Change it to an alternative that returns an array of Term
--
public Concept[] searchTerms(byte[]nb, String language, String smode,
boolean nonPreferred) {
int hits = 0;

ResultSet rs = null;
// here we are going to form a query and execute it. 
rs = p.executeQuery();
ResultSetMetaData rsmd = rs.getMetaData();
VectorConcept VTerms = new VectorConcept();
while (rs.next()) {
hits++;
Concept T = new Concept T();
T.setId(rs.getInt(1));
T.setTerm(rs.getString(2));
T.setContext(rs.getString(3));
T.setNonPreferred(rs.getString(4));
VTerms.addElement(T);
}

rs.close();
p.close();

Concept[] concepts = new Concept[C.size()];
for (int j=0; jC.size();j++) concepts[j] = (Concept)
VTerms.elementAt(j);
return concepts;
}

}



}

And you could then modify your Cocoon method to:

public void searchTerms(ContentHandler ch, byte[] nb, String language,
String smode, boolean nonpreferred)
{
Concept[] hits = searchTerms(nb, language,  smode, nonpreferred);
AttributesImpl attr = new AttributesImpl();

for (hit : hits) {
attr.addAttribute( ... );

...
ch.startElement( 
attr.clear();   
}

that way extending the use and insulating the SAX interface. One step
further is creating separate cocoon classes, that only do the SAX
production thus universalizing your business model.





On Tue, 2009-09-29 at 09:31 -0400, Paul Joseph wrote:
 Thank Jos...I follow the general concept...would you know of any example 
 that I could take a look at?
 
 thx.
 Paul
 
 Jos Snellings wrote:
  Hi Paul,
 
  Classes that live in a Cocoon environment will typically send their
  output via SAX events. They would take a ContentHandler or
  XMLConsumer as a parameter and call
  startElement/endElement/characters. 
  There might exist an insulation layer between the SAX-world and the
  objects properly.
 
  If you extend these classes with methods that return objects, and arrays
  of objects, they become available to other Views.
 
  Does this answer make sense to you?
 
  Best,
  Jos
 
  On Tue, 2009-09-29 at 06:33 -0400, Paul Joseph wrote:

  Hi there,
 
  What is the best way to make business functionality available in the 
  Java tier of my Cocoon application available available to another 
  application written in say ASP?
 
  Is sharing Cocoon applications java tier functionality with other apps. 
  possible and are there any easy ways to do this?
 
  thx.
  Paul
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 
  
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

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


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



Re: accessing java tier functionality in Cocoon

2009-09-29 Thread Jos Snellings
You can wrap java in .asp objects.
Try http://www.4guysfromrolla.com/webtech/080999-1.shtml
(I have never used asp).
Second alternative: 
make your cocoon classes to webservices. That should not be very
difficult, as these classes will be nearly webservices: they produce
XML. Call webservices from your .asp application. 

Jos

On Tue, 2009-09-29 at 10:55 -0400, Paul Joseph wrote:
 Jos,
 
 Thank you.
 
 But I am not clear on how the method is made externally available to an 
 application running in its own environment.
 
 Ie. the environments (say Tomcat for Cocoon and some Microsoft 
 environment for the ASP app) are different.
 
 How, in the example you kindly provided below, would I call the new 
 method that returns the array ie.
 
 public void searchTerms(ContentHandler ch, byte[] nb, String language,
 String smode, boolean nonpreferred)
 
 thx.
 Paul
 
 Jos Snellings wrote:
  Here is a snippet ... this is a method from an object
  ThesaurusBrowser. The method searches a number of terms from the
  thesaurus, that, say, start with a given substring: 
 
  public void searchTerms(ContentHandler ch, byte[] nb, String language,
  String smode, boolean nonpreferred)
  {
  AttributesImpl attr = new AttributesImpl();
  int hits = 0;
  ResultSet rs = null;
  // here we are going to form a query and execute it. 
  rs = p.executeQuery();
  ResultSetMetaData rsmd = rs.getMetaData();
 
  while (rs.next()) {
  hits++;
 
  attr.addAttribute(,id,id,CDATA,rs.getString(id));
  if (nonpreferred)
  attr.addAttribute(,npt,npt,CDATA,1);
  ch.startElement(,term,term,attr);
  attr.clear();
  for (int i=1; i = rsmd.getColumnCount(); i++) {
  String tagname = rsmd.getColumnName(i);
  ch.startElement(,tagname,tagname,attr);
  String value = rs.getString(i);
  if (value != null)
  ch.characters(value.toCharArray(),0,value.length());
  ch.endElement(,tagname,tagname);
  }
  ch.endElement(,term,term);
  }
 
  rs.close();
  p.close();
  }
  
  I just display the relevant part: This code produces XML
  term id=234 term=someterm context=somecontext nonPreferred=0/
  ...
  Change it to an alternative that returns an array of Term
  --
  public Concept[] searchTerms(byte[]nb, String language, String smode,
  boolean nonPreferred) {
  int hits = 0;
 
  ResultSet rs = null;
  // here we are going to form a query and execute it. 
  rs = p.executeQuery();
  ResultSetMetaData rsmd = rs.getMetaData();
  VectorConcept VTerms = new VectorConcept();
  while (rs.next()) {
  hits++;
  Concept T = new Concept T();
  T.setId(rs.getInt(1));
  T.setTerm(rs.getString(2));
  T.setContext(rs.getString(3));
  T.setNonPreferred(rs.getString(4));
  VTerms.addElement(T);
  }
  
  rs.close();
  p.close();
 
  Concept[] concepts = new Concept[C.size()];
  for (int j=0; jC.size();j++) concepts[j] = (Concept)
  VTerms.elementAt(j);
  return concepts;
  }
 
  }
 
 
 
  }
 
  And you could then modify your Cocoon method to:
 
  public void searchTerms(ContentHandler ch, byte[] nb, String language,
  String smode, boolean nonpreferred)
  {
  Concept[] hits = searchTerms(nb, language,  smode, nonpreferred);
  AttributesImpl attr = new AttributesImpl();
 
  for (hit : hits) {
  attr.addAttribute( ... );
 
  ...
  ch.startElement( 
  attr.clear();   
  }
 
  that way extending the use and insulating the SAX interface. One step
  further is creating separate cocoon classes, that only do the SAX
  production thus universalizing your business model.
 
 
 
 
 
  On Tue, 2009-09-29 at 09:31 -0400, Paul Joseph wrote:

  Thank Jos...I follow the general concept...would you know of any example 
  that I could take a look at?
 
  thx.
  Paul
 
  Jos Snellings wrote:
  
  Hi Paul,
 
  Classes that live in a Cocoon environment will typically send their
  output via SAX events. They would take a ContentHandler or
  XMLConsumer as a parameter and call
  startElement/endElement/characters. 
  There might exist an insulation layer between the SAX-world and the
  objects properly.
 
  If you extend these classes with methods that return objects, and arrays
  of objects, they become available to other Views.
 
  Does this answer make sense to you?
 
  Best,
  Jos
 
  On Tue, 2009-09-29 at 06:33 -0400, Paul Joseph wrote:


  Hi there,
 
  What is the best way to make business functionality available in the 
  Java tier of my Cocoon application available available to another 
  application

Re: Looking For Apache Cocoon Developer/Contractor

2009-10-05 Thread Jos Snellings
Hi,

My name is Jos Snellings, self employed, experienced in cocoon.
I may be interested to perform this work. Please can you provide
details?

Jos Snellings
Upperware bvba

On Fri, 2009-10-02 at 21:26 -0400, mrb...@mail.com wrote:
 Wanted: Experienced Cocoon Developer, Contractor 
 
 
 Please reply to this email address if interested.
 
 
 Thanks!
 
 


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



REVOKE: Looking For Apache Cocoon Developer/Contractor

2009-10-05 Thread Jos Snellings
Dear group, previous message is revoked. Please accept my apologies.
On Mon, 2009-10-05 at 08:51 +0200, Jos Snellings wrote:
 Hi,
 
 My name is Jos Snellings, self employed, experienced in cocoon.
 I may be interested to perform this work. Please can you provide
 details?
 
 Jos Snellings
 Upperware bvba
 
 On Fri, 2009-10-02 at 21:26 -0400, mrb...@mail.com wrote:
  Wanted: Experienced Cocoon Developer, Contractor 
  
  
  Please reply to this email address if interested.
  
  
  Thanks!
  
  
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 


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



Re: Google App Engine

2009-10-19 Thread Jos Snellings
Good point. I have been isolating Cocoon a couple of months ago.
and need to get that one out of the fridge.
The exercise proved not straigtforward. I will keep you informed.

Jos


On Mon, 2009-10-19 at 15:33 +0200, Jean-Claude Moissinac wrote:
 I'm searching of advises about using Cocoon with some cloud like
 Google App Engine.
 Is anyone has point of view about such possibility?
 


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



Re: cocoon 2.1 as WSRP producer?

2009-10-29 Thread Jos Snellings
Mmm, do you need all of the spec?
validation caching? authentication?
What do you really need?

Jos

On Thu, 2009-10-29 at 10:29 +, Paul Adriaenssens wrote:
 Hi,
 
 We have already read the documentation, but it only speaks about consuming 
 WSRP portlets. 
 We want to integrate our Cocoon application with Liferay, and therefore 
 Coccoon 2.1.11 needs to be WSRP-enabled as producer. 
 Does anybody know if this is possible?
 
 Thanks,
 
 Best regards,
 
 Paul Adriaenssens
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 


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



cocoon3 block deployment

2009-11-07 Thread Jos Snellings
Hi,

When trying to deploy a cocoon-3 block to Tomcat, it does not seem to
find it: 
java.lang.RuntimeException: There is no block 'YourBlockName' deployed.
The available blocks are {}.

I must say that the documentation on this issue is a little bit terse...
(http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html)

From what I understand: 
- pack block in a .jar file
- add a line to the manifest file META-INF/MANIFEST.MF :
  Cocoon-Block-Name: YourBlockName
  (yes it ends with a newline)
- place .jar in lib directory of webapp

Can anybody shed some light on this issue, please?

Thanks,
Jos



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



Re: cocoon3 block deployment

2009-11-10 Thread Jos Snellings
Thank you for the answer, Rheinhard,

I am afraid it does not. The web.xml I am using is from the cocoon
sample, and it contains all the necessary listeners. In the log file I
find startup information, but then it does not find the block.
By the way, if one expands the block's jar file under WEB-INF/classes, 
so that we have:
   WEB-INF/classes/COB-INF
   WEB-INF/classes/META-INF
it should be found, no?

Jos

On Tue, 2009-11-10 at 14:48 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Hi,
  
  When trying to deploy a cocoon-3 block to Tomcat, it does not seem to
  find it: 
  java.lang.RuntimeException: There is no block 'YourBlockName' deployed.
  The available blocks are {}.
  
  I must say that the documentation on this issue is a little bit terse...
  (http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html)
  
 From what I understand: 
  - pack block in a .jar file
  - add a line to the manifest file META-INF/MANIFEST.MF :
Cocoon-Block-Name: YourBlockName
(yes it ends with a newline)
  - place .jar in lib directory of webapp
  
  Can anybody shed some light on this issue, please?
 
 In order to use a Cocoon *block*, you also have to install the
 BlockDeploymentServletContextListener in your web.xml:
 
 listener
 listener-classorg.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener/listener-class
 /listener
 
 
 
 If the block provides servlet-services, you have to use the
 DispatcherServlet of the servlet-service-framework which collects and
 mounts all servlets that are registered as Spring beans.
 
 servlet
   descriptionCocoon blocks dispatcher/description
   display-nameDispatcherServlet/display-name
   servlet-nameDispatcherServlet/servlet-name
 
 servlet-classorg.apache.cocoon.servletservice.DispatcherServlet/servlet-class
   load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
   servlet-nameDispatcherServlet/servlet-name
   url-pattern/*/url-pattern
 /servlet-mapping
 
 
 
 And of course you have to properly setup Spring:
 
 !--
 Declare Spring context listener which sets up the Spring Application
 Context containing all Cocoon components (and user defined beans as
 well).
 --
 listener
 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 /listener
 
 !--
 Declare Spring request listener which sets up the required
 RequestAttributes to support Springs and Cocoon custom bean scopes
 like the request scope or the session scope.
 --
 listener
 listener-classorg.springframework.web.context.request.RequestContextListener/listener-class
 /listener
 
 
 Does this answer your question?
 


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



Re: cocoon3 block deployment

2009-11-10 Thread Jos Snellings
Yet something is missing, logging at debuglevel: 
At startup, none of the methods in DeploymentUtil is ever called :-(

When a block's url is called it is not found:
2009-11-10 15:37:10,139 DEBUG main org.apache.jasper.servlet.JspServlet
- Scratch dir for the JSP engine
is: /usr/local/apache-tomcat-5.5.27/work/Catalina/localhost/testcocoon
2009-11-10 15:37:10,140 DEBUG main org.apache.jasper.servlet.JspServlet
- IMPORTANT: Do not modify the generated servlets
2009-11-10 15:37:46,378 DEBUG http-8080-Processor25
org.springframework.web.context.request.RequestContextListener - Bound
request context to thread:
org.apache.catalina.connector.requestfac...@1480773
2009-11-10 15:37:46,402 DEBUG http-8080-Processor25
org.springframework.beans.factory.support.DefaultListableBeanFactory -
Returning cached instance of singleton bean
'org.apache.cocoon.servletservice.spring.BlockServletMap'
2009-11-10 15:37:46,421 DEBUG http-8080-Processor25
org.springframework.beans.factory.support.DefaultListableBeanFactory -
Returning cached instance of singleton bean
'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0'
2009-11-10 15:37:46,429 INFO  http-8080-Processor25
org.apache.cocoon.servletservice.DispatcherServlet - No block for /
2009-11-10 15:37:46,429 DEBUG http-8080-Processor25
org.springframework.web.context.request.RequestContextListener - Cleared
thread-bound request context:
org.apache.catalina.connector.requestfac...@1480773
2009-11-10 15:38:10,296 DEBUG
ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.session.ManagerBase - Start expire sessions
StandardManager at 1257863890296 sessioncount 0
2009-11-10 15:38:10,297 DEBUG
ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.session.ManagerBase - End expire sessions
StandardManager processingTime 1 expired sessions: 0

And sorry for misspelling your name, Reinhard.


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



Re: cocoon3 block deployment

2009-11-11 Thread Jos Snellings
antlr-2.7.7.jar  
cocoon-configuration-api-1.0.2.jar
cocoon-servlet-3.0.0-alpha-1.jar   
commons-collections-3.2.jar spring-aop-2.5.5.jarstringtemplate-3.0.jar
aopalliance-1.0.jar  
cocoon-controller-3.0.0-alpha-1.jar
cocoon-servlet-service-impl-1.1.0.jar
commons-io-1.4.jar  
spring-beans-2.5.5.jar
aspectjrt-1.5.4.jar  
cocoon-jnet-1.0.0.jar cocoon-sitemap-3.0.0-alpha-1.jar 
commons-jexl-1.1.jar
log4j-1.2.14.jar  
spring-context-2.5.5.jar
aspectjweaver-1.5.4.jar  
cocoon-pipeline-3.0.0-alpha-1.jar
cocoon-spring-configurator-2.0.0.jar   
commons-lang-2.3.jar
servlet-api-2.3.jar   
spring-core-2.5.5.jar
cocoon-block-deployment.jar  
cocoon-rest-3.0.0-alpha-1.jar cocoon-stringtemplate-3.0.0-alpha-1.jar
commons-logging-1.1.jar sigblok.jar  - this
is the block  
spring-web-2.5.5.jar

Are these not the dependencies mentioned in the pom file?


On Wed, 2009-11-11 at 08:47 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Thank you for the answer, Rheinhard,
  
  I am afraid it does not. The web.xml I am using is from the cocoon
  sample, and it contains all the necessary listeners. In the log file I
  find startup information, but then it does not find the block.
  By the way, if one expands the block's jar file under WEB-INF/classes, 
  so that we have:
 WEB-INF/classes/COB-INF
 WEB-INF/classes/META-INF
  it should be found, no?
 
 No, I don't think that this works.
 
 What libraries do you have in your /WEB-INF/lib directory?
 


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



Re: cocoon3 block deployment

2009-11-11 Thread Jos Snellings
You mean this would yield the better versions?
Yes I have the cocoon trunk from alpha-2 level, and they were converted
to eclipse projects.
You mean if I build this together the result might be far better?
OK, I will do that.

By the way, when is the beta coming about? Now I need it.

Thanks,
Jos


On Wed, 2009-11-11 at 09:42 +0100, Reinhard Pötz wrote:
 Have you also tried to use Cocoon 3 trunk to build and run your application?
 
 Jos Snellings wrote:
  antlr-2.7.7.jar  
  cocoon-configuration-api-1.0.2.jar
  cocoon-servlet-3.0.0-alpha-1.jar   
  commons-collections-3.2.jar spring-aop-2.5.5.jarstringtemplate-3.0.jar
  aopalliance-1.0.jar  
  cocoon-controller-3.0.0-alpha-1.jar
  cocoon-servlet-service-impl-1.1.0.jar
  commons-io-1.4.jar  
  spring-beans-2.5.5.jar
  aspectjrt-1.5.4.jar  
  cocoon-jnet-1.0.0.jar cocoon-sitemap-3.0.0-alpha-1.jar  
 
  commons-jexl-1.1.jar
  log4j-1.2.14.jar  
  spring-context-2.5.5.jar
  aspectjweaver-1.5.4.jar  
  cocoon-pipeline-3.0.0-alpha-1.jar
  cocoon-spring-configurator-2.0.0.jar   
  commons-lang-2.3.jar
  servlet-api-2.3.jar   
  spring-core-2.5.5.jar
  cocoon-block-deployment.jar  
  cocoon-rest-3.0.0-alpha-1.jar 
  cocoon-stringtemplate-3.0.0-alpha-1.jar
  commons-logging-1.1.jar sigblok.jar  - 
  this
  is the block  
  spring-web-2.5.5.jar
  
  Are these not the dependencies mentioned in the pom file?
  
  
  On Wed, 2009-11-11 at 08:47 +0100, Reinhard Pötz wrote:
  Jos Snellings wrote:
  Thank you for the answer, Rheinhard,
 
  I am afraid it does not. The web.xml I am using is from the cocoon
  sample, and it contains all the necessary listeners. In the log file I
  find startup information, but then it does not find the block.
  By the way, if one expands the block's jar file under WEB-INF/classes, 
  so that we have:
 WEB-INF/classes/COB-INF
 WEB-INF/classes/META-INF
  it should be found, no?
  No, I don't think that this works.
 
  What libraries do you have in your /WEB-INF/lib directory?
 
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
  
  
 
 



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



Re: cocoon3 block deployment

2009-11-11 Thread Jos Snellings
Are 
jnet and 
block-deployment 
servlet-service
likely to change for 3.0? I think not.
Is cocoon-configuration needed?
 
Thanks, 
Jos


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



org.apache.cocoon.xml.sax.SAXBuffer

2009-11-13 Thread Jos Snellings
Hi,

Where is org.apache.cocoon.xml.sax.SAXBuffer to be found?
I cannot find it in the trunk.

The class is used in ServletServiceTransformer.

Was it refactored from org.apache.cocoon.pipeline.util ?

Thanks,
Jos


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



Re: org.apache.cocoon.xml.sax.SAXBuffer

2009-11-13 Thread Jos Snellings
Excuse me, it is in
cocoon-xml-2.0.0.jar
my question is: where is the source code? 
Is there a project on svn.apache.org/repos/asf/cocoon ?

Thank you so much,
Jos


On Fri, 2009-11-13 at 09:54 +0100, Jos Snellings wrote:
 Hi,
 
 Where is org.apache.cocoon.xml.sax.SAXBuffer to be found?
 I cannot find it in the trunk.
 
 The class is used in ServletServiceTransformer.
 
 Was it refactored from org.apache.cocoon.pipeline.util ?
 
 Thanks,
 Jos
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: cocoon3 block deployment

2009-11-17 Thread Jos Snellings
Please find below the follow up on the tomcat deployment problem. I am sure it 
is of interest 
to a lot of users:
With the latest sources checked out from svn, built in eclipse the problem is 
solved.

Deployment under tomcat:
1. add xercesImpl.jar 
2. in the local build I have no pom.properties file included in the jar 
   (in fact, in my builds there is no META-INF/maven), so 
XMLSitemapServlet.initVersionNumber() will fail,
   I stubbed that method for the time being.
3. An entry Cocoon-Block-Name in the manifest file is not necessary, this 
invalidates:
   http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html

Blocks are neatly deployed under the mount point specified in the 
servlet-service bean declaration.

I had to adapt the samples to the alpha-2 level. Some classes were refactored 
to cocoon-sax, others are obsolete.
Is the new version available? Care for the adapted code?

Cheers,
Jos



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



Re: cocoon3 block deployment

2009-11-17 Thread Jos Snellings
It's good to hear but I wonder how this can work for you at all ;-)

Well, this is admittedly a bit exceptional. In this forum, mostly people
invest efforts to figure out why something does not work, we are about
to try to find out why something works ;-)
Anyway, where is the code where this happens. blockcontexts are
registered via jnet, no? Blockcontexts are mounted in
cocoon-block-deployment.

On not using maven:
Every single project comes with an eclipse goal, so mvn eclipse:eclipse
builds a nice importable project. After import the 'autobuild' is on,
so, I just grab COB-INF and META-INF together with 'jar cvf
somesample.jar, and the cocoon block is ready.

I mainly suppressed maven to replace all internal cocoon dependencies by
dependencies on the mutual projects, rather than making them rely on the
maven repository. This enables me to 'tweak' the code if necessary. In
any case, it allows me to better understand what's happening. One day I
must write a 'cocoon for blondes' page.

New version: 
I depart from 'getting started', get the maven archetypes and artefacts:
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create
-DarchetypeGroupId=org.apache.cocoon.archetype-sample
-DarchetypeArtifactId=cocoon-archetype-sample
-DarchetypeVersion=3.0.0-alpha-1 -DgroupId=org.tanteterra
-DartifactId=newsample

What are the magic words for the alpha2 archetype?
I come back with a list of compilation errors.

Cheers,
Jos

On Tue, 2009-11-17 at 15:38 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Please find below the follow up on the tomcat deployment problem. I am sure 
  it is of interest 
  to a lot of users:
  With the latest sources checked out from svn, built in eclipse the problem 
  is solved.
  
  Deployment under tomcat:
  1. add xercesImpl.jar 
  2. in the local build I have no pom.properties file included in the jar 
 (in fact, in my builds there is no META-INF/maven), so 
  XMLSitemapServlet.initVersionNumber() will fail,
 I stubbed that method for the time being.
 
 So you don't use Maven to build Cocoon 3 trunk?
 
  3. An entry Cocoon-Block-Name in the manifest file is not necessary, this 
  invalidates:
 http://cocoon.apache.org/subprojects/block-deployment/1.1/1471_1_1.html
 
 The blockcontext:/ protocol usually used in the Servlet-Service
 definition relies on this entry. Without it, the servlet context can't
 be resolved correctly.
 
  Blocks are neatly deployed under the mount point specified in the 
  servlet-service bean declaration.
 
 It's good to hear but I wonder how this can work for you at all ;-)
 
  I had to adapt the samples to the alpha-2 level. Some classes were 
  refactored to cocoon-sax, others are obsolete.
  Is the new version available? Care for the adapted code?
 
 What do you mean by new version?
 



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



Re: Timer on cocoon

2009-11-24 Thread Jos Snellings
Is MyTimerThread the task you want to schedule?
- you could create a spring bean, with
org.springframework.scheduling.quartz.JobDetailBean
- you can start your timerthread in the init() method of a servlet to
start a task off when cocoon starts working. Not sure if that works for
2.2.

Hope that helps...

On Tue, 2009-11-24 at 13:16 +0200, Gintare Ragaisiene wrote:
 Hi, Jos,
 
Quartz is ok and Java Timer is ok for me. But haw and where I
 should input lines like MyTimerThread.start() to start timer when
 cocoon starts working on server ?
 
 Gintare
 
 
 
 On Tue, Nov 24, 2009 at 11:10 AM, Jos Snellings
 jos.snelli...@pandora.be wrote:
 Hi, Gintare,
 
 Cocoon is not even remotely a system to schedule operations.
 Maybe you are looking for something like
 http://www.quartz-scheduler.org/
 Most OS let you schedule jobs.
 
 Jos
 
 
 
 On Tue, 2009-11-24 at 10:53 +0200, Gintare Ragaisiene wrote:
  Hello,
 
 I need to do some job with db periodically. For this I
 need to set
  up timer.
 
 How can I do this in cocoon 2.2 ?
 
  Thanks,
  Gintare
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



cocoon 3: xslt and pickup java scripts

2009-11-25 Thread Jos Snellings
Hello !

I have a strange observation to share:
when multiple javascripts are included in an XSLT transformation, to
land in the head of an html page, it is observed that some are never
fetched, by FireFox 3.5.5 (Ubuntu). 

I clarify: exerpt 1: from sitemap, pipeline for static resources:
 map:pipeline type=async-caching 
  map:match pattern=images/{name}.jpg
   map:read src=presentation/images/{map:name}.jpg
mime-type=image/jpeg /
  /map:match
   map:match pattern=images/{name}.gif
map:read src=presentation/images/{map:name}.gif
mime-type=image/gif /
  /map:match
  map:match pattern=css/{name}.css
   map:read src=presentation/style/{map:name}.css
mime-type=text/css /
  /map:match
  map:match pattern=css/images/{name}
   map:read src=presentation/style/images/{map:name}
mime-type=image/png /
  /map:match
  map:match pattern=js/{name}.js
map:read src=presentation/javascript/{map:name}.js /
  /map:match

--
xsl:template match=/
html
head
title Herein Thesaurus /title   
  
   link rel=stylesheet type=text/css
href=/thesaurus/css/herein.css/
   link rel=stylesheet type=text/css
href=/thesaurus/css/jquery_treeview.css/

script type=text/javascript
src=/thesaurus/js/jquery.js/script
script type=text/javascript
src=/thesaurus/js/jquery_cookie.js/script
script type=text/javascript
src=/thesaurus/js/jquery_treeview.js/script

   script type=text/javascript
src=/thesaurus/js/thesaurus.js/script
   
   script type=text/javascript
   
$(function() {
$(#tree).treeview({
collapsed: true,
animated: medium,
control:#sidetreecontrol,
persist: location
});
})

/script 
/head
-
I detailed the log to debug level for the cocoon output, and, to my
amazement, I find that the pipeline does not react at all: javascripts 
jquery_treeview and jquery_cookie are never fetched.

--
Observation: when I place the same html under the form of a static html
page, all the scripts are nicely fetched.


What could be the cause of this - admittedly strange - phenomenon?
Anybody observed a similar test case?

Reinhard, as you make heavy use of rich client javascripting, do you
know about this?
Am I overlooking something essential?
I see no reason why the result of a xslt transformation would behave
different, so obviously I am.

Kind regards,
Jos












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



Re: cocoon 3: xslt and pickup java scripts

2009-11-25 Thread Jos Snellings
I was about to do that, it really points in the direction of firefox.
I will let you know


On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Hello !
  
  I have a strange observation to share:
  when multiple javascripts are included in an XSLT transformation, to
  land in the head of an html page, it is observed that some are never
  fetched, by FireFox 3.5.5 (Ubuntu). 
  
  I clarify: exerpt 1: from sitemap, pipeline for static resources:
   map:pipeline type=async-caching 
map:match pattern=images/{name}.jpg
 map:read src=presentation/images/{map:name}.jpg
  mime-type=image/jpeg /
/map:match
 map:match pattern=images/{name}.gif
  map:read src=presentation/images/{map:name}.gif
  mime-type=image/gif /
/map:match
map:match pattern=css/{name}.css
 map:read src=presentation/style/{map:name}.css
  mime-type=text/css /
/map:match
map:match pattern=css/images/{name}
 map:read src=presentation/style/images/{map:name}
  mime-type=image/png /
/map:match
map:match pattern=js/{name}.js
  map:read src=presentation/javascript/{map:name}.js /
/map:match
  
  --
  xsl:template match=/
  html
  head
  title Herein Thesaurus /title   

 link rel=stylesheet type=text/css
  href=/thesaurus/css/herein.css/
 link rel=stylesheet type=text/css
  href=/thesaurus/css/jquery_treeview.css/
  
  script type=text/javascript
  src=/thesaurus/js/jquery.js/script
  script type=text/javascript
  src=/thesaurus/js/jquery_cookie.js/script
  script type=text/javascript
  src=/thesaurus/js/jquery_treeview.js/script
  
 script type=text/javascript
  src=/thesaurus/js/thesaurus.js/script
 
 script type=text/javascript
 
  $(function() {
  $(#tree).treeview({
  collapsed: true,
  animated: medium,
  control:#sidetreecontrol,
  persist: location
  });
  })
  
  /script 
  /head
  -
  I detailed the log to debug level for the cocoon output, and, to my
  amazement, I find that the pipeline does not react at all: javascripts 
  jquery_treeview and jquery_cookie are never fetched.
  
  --
  Observation: when I place the same html under the form of a static html
  page, all the scripts are nicely fetched.
  
  
  What could be the cause of this - admittedly strange - phenomenon?
  Anybody observed a similar test case?
  
  Reinhard, as you make heavy use of rich client javascripting, do you
  know about this?
  Am I overlooking something essential?
  I see no reason why the result of a xslt transformation would behave
  different, so obviously I am.
 
 This sounds like some browser caching issue.
 Have you used Firebug to track down the problem?
 



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



Re: cocoon 3: xslt and pickup java scripts

2009-11-25 Thread Jos Snellings
Hi Glen, 

Just a very quick test (I have to leave in a minute) 
shows that your trick works.
Thank you very much for sharing it. Now it remains to find out why
xhtml shows this behaviour and whether it is only a firefox issue or
not.

Jos

On Wed, 2009-11-25 at 11:32 +, Glen Robson wrote:
 Hi,
 
 I don't know if its related but I have had problems with firefox and  
 javascript if the serializer was set to return xhtml. As soon as I set  
 the serializer to html the javascript seems to work OK.
 
 Thanks
 
 Glen
 
 On 25 Nov 2009, at 10:59, Jos Snellings wrote:
 
  Hello !
 
  I have a strange observation to share:
  when multiple javascripts are included in an XSLT transformation, to
  land in the head of an html page, it is observed that some are never
  fetched, by FireFox 3.5.5 (Ubuntu).
 
  I clarify: exerpt 1: from sitemap, pipeline for static resources:
  map:pipeline type=async-caching
   map:match pattern=images/{name}.jpg
map:read src=presentation/images/{map:name}.jpg
  mime-type=image/jpeg /
   /map:match
map:match pattern=images/{name}.gif
 map:read src=presentation/images/{map:name}.gif
  mime-type=image/gif /
   /map:match
   map:match pattern=css/{name}.css
map:read src=presentation/style/{map:name}.css
  mime-type=text/css /
   /map:match
   map:match pattern=css/images/{name}
map:read src=presentation/style/images/{map:name}
  mime-type=image/png /
   /map:match
   map:match pattern=js/{name}.js
 map:read src=presentation/javascript/{map:name}.js /
   /map:match
 
  --
  xsl:template match=/
  html
  head
 title Herein Thesaurus /title
 
link rel=stylesheet type=text/css
  href=/thesaurus/css/herein.css/
link rel=stylesheet type=text/css
  href=/thesaurus/css/jquery_treeview.css/
 
  script type=text/javascript
  src=/thesaurus/js/jquery.js/script
 script type=text/javascript
  src=/thesaurus/js/jquery_cookie.js/script
 script type=text/javascript
  src=/thesaurus/js/jquery_treeview.js/script
 
script type=text/javascript
  src=/thesaurus/js/thesaurus.js/script
 
script type=text/javascript
 
  $(function() {
  $(#tree).treeview({
  collapsed: true,
  animated: medium,
  control:#sidetreecontrol,
  persist: location
  });
  })
  
  /script
  /head
  -
  I detailed the log to debug level for the cocoon output, and, to my
  amazement, I find that the pipeline does not react at all: javascripts
  jquery_treeview and jquery_cookie are never fetched.
 
  --
  Observation: when I place the same html under the form of a static  
  html
  page, all the scripts are nicely fetched.
 
 
  What could be the cause of this - admittedly strange - phenomenon?
  Anybody observed a similar test case?
 
  Reinhard, as you make heavy use of rich client javascripting, do you
  know about this?
  Am I overlooking something essential?
  I see no reason why the result of a xslt transformation would behave
  different, so obviously I am.
 
  Kind regards,
  Jos
 
 
 
 
 
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: cocoon 3: xslt and pickup java scripts: Firebug

2009-11-25 Thread Jos Snellings
Hi !

Here is what Firebug has to tell: 
when an xhtml serializer is selected, this is the output:

script src=/thesaurus/js/jquery.js type=text/javascript/
script src=/thesaurus/js/jquery_cookie.js type=text/javascript/
script src=/thesaurus/js/jquery_treeview.js type=text/javascript/
script type=text/javascript
$(function() {
$(#tree).treeview({
collapsed: true,
animated: medium,
control:#sidetreecontrol,
persist: location
});
})

/script
---
Firefox sees only the first javascript.
By the way: in het xslt rule the script tags are: 
script src=/thesaurus/js/jquery.js type=text/javascript/script
but these are converted to single elements script/, and it looks as if 
Firefox has a problem.
-
A DOM inspection confirms this: 
It looks as if the subsequent script tags are regarded as sub-elements of the 
first script tag.


I haven't tested with other browsers.
Is this to be considered as an issue? Fact is that the produced xhtml is valid 
and *should* work.

Kind regards,
Jos


On Wed, 2009-11-25 at 13:16 +0100, Jos Snellings wrote:
 I was about to do that, it really points in the direction of firefox.
 I will let you know
 
 
 On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote:
  Jos Snellings wrote:
   Hello !
   
   I have a strange observation to share:
   when multiple javascripts are included in an XSLT transformation, to
   land in the head of an html page, it is observed that some are never
   fetched, by FireFox 3.5.5 (Ubuntu). 
   
   I clarify: exerpt 1: from sitemap, pipeline for static resources:
map:pipeline type=async-caching 
 map:match pattern=images/{name}.jpg
  map:read src=presentation/images/{map:name}.jpg
   mime-type=image/jpeg /
 /map:match
  map:match pattern=images/{name}.gif
   map:read src=presentation/images/{map:name}.gif
   mime-type=image/gif /
 /map:match
 map:match pattern=css/{name}.css
  map:read src=presentation/style/{map:name}.css
   mime-type=text/css /
 /map:match
 map:match pattern=css/images/{name}
  map:read src=presentation/style/images/{map:name}
   mime-type=image/png /
 /map:match
 map:match pattern=js/{name}.js
   map:read src=presentation/javascript/{map:name}.js /
 /map:match
   
   --
   xsl:template match=/
   html
   head
   title Herein Thesaurus /title   
 
  link rel=stylesheet type=text/css
   href=/thesaurus/css/herein.css/
  link rel=stylesheet type=text/css
   href=/thesaurus/css/jquery_treeview.css/
   
 script type=text/javascript
   src=/thesaurus/js/jquery.js/script
   script type=text/javascript
   src=/thesaurus/js/jquery_cookie.js/script
   script type=text/javascript
   src=/thesaurus/js/jquery_treeview.js/script
   
  script type=text/javascript
   src=/thesaurus/js/thesaurus.js/script
  
  script type=text/javascript
  
 $(function() {
 $(#tree).treeview({
 collapsed: true,
 animated: medium,
 control:#sidetreecontrol,
 persist: location
 });
 })
 
 /script 
   /head
   -
   I detailed the log to debug level for the cocoon output, and, to my
   amazement, I find that the pipeline does not react at all: javascripts 
   jquery_treeview and jquery_cookie are never fetched.
   
   --
   Observation: when I place the same html under the form of a static html
   page, all the scripts are nicely fetched.
   
   
   What could be the cause of this - admittedly strange - phenomenon?
   Anybody observed a similar test case?
   
   Reinhard, as you make heavy use of rich client javascripting, do you
   know about this?
   Am I overlooking something essential?
   I see no reason why the result of a xslt transformation would behave
   different, so obviously I am.
  
  This sounds like some browser caching issue.
  Have you used Firebug to track down the problem?
  
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



-
To unsubscribe, e-mail: users-unsubscr

RE: cocoon 3: xslt and pickup java scripts: Firebug

2009-11-25 Thread Jos Snellings
Indeed, Robby, this is clearly the behaviour we are observing.
But, even if you avoid the minimized tags, I have the impression 
that the XSLT step is converting empty tag pairs to minimized ones.
Shouldn't we avoid this, given the recommendation?

Jos


On Wed, 2009-11-25 at 17:02 +0100, Robby Pelssers wrote:
 Some article explains a bit more:
 
 
 http://forums.mozillazine.org/viewtopic.php?f=25t=297285
 
 The first empty DIV closes itself with the trailing slash. This is allowed in 
 XML (XHTML is XML), but it is not allowed in HTML. If your document (1) has 
 an XHTML doctype declaration at the beginning of the document, (2) has the 
 proper namespace declaration, and (3) is being served with the proper mime 
 type by the server (application/xhtml+xml), there is no difference between 
 those two empty DIVs.
 
 However, if you miss any of those three criteria, your document is not going 
 to be rendered as XML, and you will not get the results you expect. With the 
 wrong mime type sent by the server, the document will be rendered as HTML. In 
 HTML, div / syntax will be read as an opening div tag, and the browser will 
 expect a closing tag.
 
 The XHTML compatibility guidelines advise you not to use the minimized tag 
 syntax for compatibility reasons. Even if Firefox renders your XHTML 
 properly, older browsers that only understand HTML will choke and die on the 
 DIV that is not properly closed in HTML. Read 4.3 and 4.6 here.
 
 
 
 -Original Message-
 From: Robby Pelssers [mailto:robby.pelss...@ciber.com] 
 Sent: Wednesday, November 25, 2009 4:58 PM
 To: users@cocoon.apache.org
 Subject: RE: cocoon 3: xslt and pickup java scripts: Firebug
 
 I've seen this behavior for other tags as well...
 
 For instance with empty div tags
 
 In that case subsequent tags are sometimes treated as children of the empty 
 preceding div tag.
 
 
 Kind regards,
 Robby
 
 -Original Message-
 From: Jos Snellings [mailto:jos.snelli...@pandora.be] 
 Sent: Wednesday, November 25, 2009 4:51 PM
 To: users@cocoon.apache.org
 Subject: Re: cocoon 3: xslt and pickup java scripts: Firebug
 
 Hi !
 
 Here is what Firebug has to tell: 
 when an xhtml serializer is selected, this is the output:
 
 script src=/thesaurus/js/jquery.js type=text/javascript/
 script src=/thesaurus/js/jquery_cookie.js type=text/javascript/
 script src=/thesaurus/js/jquery_treeview.js type=text/javascript/
 script type=text/javascript
   $(function() {
   $(#tree).treeview({
   collapsed: true,
   animated: medium,
   control:#sidetreecontrol,
   persist: location
   });
   })
   
 /script
 ---
 Firefox sees only the first javascript.
 By the way: in het xslt rule the script tags are: 
 script src=/thesaurus/js/jquery.js type=text/javascript/script
 but these are converted to single elements script/, and it looks as if 
 Firefox has a problem.
 -
 A DOM inspection confirms this: 
 It looks as if the subsequent script tags are regarded as sub-elements of the 
 first script tag.
 
 
 I haven't tested with other browsers.
 Is this to be considered as an issue? Fact is that the produced xhtml is 
 valid and *should* work.
 
 Kind regards,
 Jos
 
 
 On Wed, 2009-11-25 at 13:16 +0100, Jos Snellings wrote:
  I was about to do that, it really points in the direction of firefox.
  I will let you know
  
  
  On Wed, 2009-11-25 at 12:44 +0100, Reinhard Pötz wrote:
   Jos Snellings wrote:
Hello !

I have a strange observation to share:
when multiple javascripts are included in an XSLT transformation, to
land in the head of an html page, it is observed that some are never
fetched, by FireFox 3.5.5 (Ubuntu). 

I clarify: exerpt 1: from sitemap, pipeline for static resources:
 map:pipeline type=async-caching 
  map:match pattern=images/{name}.jpg
   map:read src=presentation/images/{map:name}.jpg
mime-type=image/jpeg /
  /map:match
   map:match pattern=images/{name}.gif
map:read src=presentation/images/{map:name}.gif
mime-type=image/gif /
  /map:match
  map:match pattern=css/{name}.css
   map:read src=presentation/style/{map:name}.css
mime-type=text/css /
  /map:match
  map:match pattern=css/images/{name}
   map:read src=presentation/style/images/{map:name}
mime-type=image/png /
  /map:match
  map:match pattern=js/{name}.js
map:read src=presentation/javascript/{map:name}.js /
  /map:match

--
xsl:template match=/
html
head
title Herein Thesaurus /title   
  
   link rel=stylesheet type=text/css

Re: cocoon 3: xslt and pickup java scripts: Firebug

2009-11-26 Thread Jos Snellings
I have seen these, they are in 'cocoon-optional', but how to configure
in the pipeline? 
map:serialize type=exhtml/
or ehtml?
(are there new samples? I did not know)


On Thu, 2009-11-26 at 18:22 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Indeed, Robby, this is clearly the behaviour we are observing. But,
  even if you avoid the minimized tags, I have the impression that the
  XSLT step is converting empty tag pairs to minimized ones. Shouldn't
  we avoid this, given the recommendation?
 
 Some weeks ago I added alternative serializers for HTML/XML/XHTML to
 Cocoon 3 trunk. Those take care of many of those tricky serialization
 problems. Look for Encoding Serializers in the samples.
 



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



Re: REST / Can't find URLResponseBuilder

2009-11-29 Thread Jos Snellings
If I understand you well, your assignment is to:

* catch a get URL emitted by Google Earch
* this url contains coordinates
* on the basis of these coordinates you lookup things in an XML file.

Here's my advice: forget about the RESTController and just write a
generator, like:
public class SehensWuerdigkeitenGenerator extends AbstractSAXGenerator
implements CachingPipelineComponent {
  
@SitemapParameter
private String language;
  
@SitemapParameter
private String cmd;

private String pur;
private String par;

private HttpServletRequest request;

And you do the interesting bits within: 

public void execute() {
  - read your bits 
SAXConsumer consumer = this.getSAXConsumer();
try {
consumer.startDocument();

consumer.startElement(, page, page, new
AttributesImpl());
 --- do the interesting stuff to be sent to XSLT
}

Oh, by the way, another possibility: just read your XML file if it's
just one. And extract the chunks you need in the XSLT transform, with
XPath. The last could be the shorter.

Mmmm you are a student. I am an old man and I would say: bear in mind
that 'REST' is just another concept, sometimes java people like to make
things complicated... Why make things simple and efficient if you can
make them complex and wonderful.
By the way, I will redirect this discussion to cocoon users. 

Cheers,
Jos





On Sun, 2009-11-29 at 13:19 +0100, Johannes Lichtenberger wrote:
 On Sun, 2009-11-29 at 07:32 +0100, Jos Snellings wrote:
  In the samples, a typical use of StringTemplate is shown: a page is to
  be interpreted by the StringTemplate engine, and a number of properties
  are passed via the hashtable.
  The idea is that you would open a view on the object.
  So, 
  - the query points to a resource
  - the controller decodes what the resource is and what you want (view
  it, update it?)
  - the way to view it could be: pass my resource to a StringTemplate
  invocation:  new Page('stringtemplateinvocation',resource);
   
  However, I have not tried to elaborate this so far. Shall I post it when
  i have a useable example?
 
 Yes it would be great. My concern is that I don't want to display a
 template page. I want to process the request (the parameters Google
 Earth sends when zooming in) and within my Generator query a native XML
 database system and built the algorithmic logic inside the generator
 (what data out of the shreddered xml file is needed and has to be
 transformed with an XSLT stylesheet). So I basically know how RESTful
 webservices work, but I don't know how to use cocoon3 in this case (I
 assume new Page(...) isn't the right thing to return when I just want to
 pass the request params to my generator. So I don't want to use
 StringTemplate in this case (but it's nontheless a great thing). So the
 query points to a controller, which decides that it's a GET request
 (view) and passes the parameters on to my generator (which I still have
 to write). 
 
 Would be great if you or someone else could help me out (it's a project
 in a course of our university ;-) and I thought cocoon is great for this
 concern (get RESTful parameters, hand it on to a generator which selects
 the needed data out of a shreddered xml file according to the
 parameters, then transform the xml fragments with a XSLT stylesheet and
 serialize the result, so that Google Earth can use the KML fragments
 generated).
 
 Thank you,
 Johannes
 
 



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



Re: REST / Can't find URLResponseBuilder

2009-12-01 Thread Jos Snellings
O yes, you are right! It dates from a couple of trials in alpha-1,
when I was having trouble to make setup() work. Thanks.

Jos

On Tue, 2009-12-01 at 22:21 +0100, Steven Dolg wrote:
 Jos Snellings schrieb:
  If I understand you well, your assignment is to:
 
  * catch a get URL emitted by Google Earch
  * this url contains coordinates
  * on the basis of these coordinates you lookup things in an XML file.
 
  Here's my advice: forget about the RESTController and just write a
  generator, like:
  public class SehensWuerdigkeitenGenerator extends AbstractSAXGenerator
  implements CachingPipelineComponent {

  @SitemapParameter
  private String language;

  @SitemapParameter
  private String cmd;
  
  private String pur;
  private String par;
  
  private HttpServletRequest request;

 
 Well I agree that this looks very nice, unfortunately the 
 @SitemapParameter annotation is only available in the REST module of 
 Cocoon and only working for Controllers.
 A meaningful explanation would include the layered approach and 
 assumptions about the environment - I'll do this another time.
 
 However the intended way would be:
 
 for Parameters retrieved through the sitemap
 
 @Override
 public void setConfiguration(MapString, ? extends Object parameters) {
 this.language = (String) parameters.get(language);
 }
 
 
 for Parameters retrieved through the actual invocation (e.g. HTTP request)
 
 @Override
 public void setup(MapString, Object parameters) {
 this.cmd = (String)parameters.get(cmd);
 }
 
 
 
  And you do the interesting bits within: 
 
  public void execute() {
- read your bits 
  SAXConsumer consumer = this.getSAXConsumer();
  try {
  consumer.startDocument();
 
  consumer.startElement(, page, page, new
  AttributesImpl());
   --- do the interesting stuff to be sent to XSLT
  }
 
  Oh, by the way, another possibility: just read your XML file if it's
  just one. And extract the chunks you need in the XSLT transform, with
  XPath. The last could be the shorter.
 
  Mmmm you are a student. I am an old man and I would say: bear in mind
  that 'REST' is just another concept, sometimes java people like to make
  things complicated... Why make things simple and efficient if you can
  make them complex and wonderful.

 
 And now I know where this marvelous quote is from.
 Well done, old man! :-P
 
 
 Steven
 
  By the way, I will redirect this discussion to cocoon users. 
 
  Cheers,
  Jos
 
 
 
 
 
  On Sun, 2009-11-29 at 13:19 +0100, Johannes Lichtenberger wrote:

  On Sun, 2009-11-29 at 07:32 +0100, Jos Snellings wrote:
  
  In the samples, a typical use of StringTemplate is shown: a page is to
  be interpreted by the StringTemplate engine, and a number of properties
  are passed via the hashtable.
  The idea is that you would open a view on the object.
  So, 
  - the query points to a resource
  - the controller decodes what the resource is and what you want (view
  it, update it?)
  - the way to view it could be: pass my resource to a StringTemplate
  invocation:  new Page('stringtemplateinvocation',resource);
   
  However, I have not tried to elaborate this so far. Shall I post it when
  i have a useable example?

  Yes it would be great. My concern is that I don't want to display a
  template page. I want to process the request (the parameters Google
  Earth sends when zooming in) and within my Generator query a native XML
  database system and built the algorithmic logic inside the generator
  (what data out of the shreddered xml file is needed and has to be
  transformed with an XSLT stylesheet). So I basically know how RESTful
  webservices work, but I don't know how to use cocoon3 in this case (I
  assume new Page(...) isn't the right thing to return when I just want to
  pass the request params to my generator. So I don't want to use
  StringTemplate in this case (but it's nontheless a great thing). So the
  query points to a controller, which decides that it's a GET request
  (view) and passes the parameters on to my generator (which I still have
  to write). 
 
  Would be great if you or someone else could help me out (it's a project
  in a course of our university ;-) and I thought cocoon is great for this
  concern (get RESTful parameters, hand it on to a generator which selects
  the needed data out of a shreddered xml file according to the
  parameters, then transform the xml fragments with a XSLT stylesheet and
  serialize the result, so that Google Earth can use the KML fragments
  generated).
 
  Thank you,
  Johannes
 
 
  
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

 
 
 -
 To unsubscribe, e

URLConnectionUtils.closeLoudly()

2009-12-04 Thread Jos Snellings
Hi!

At the end of RESTController I get:

2009-12-04 14:57:26,014 ERROR http-8080-Processor20
org.apache.cocoon.sitemap.InvocationImpl/handle-errors - Error while
executing the sitemap. [request-uri=/editor/put/definition/1124]
java.lang.NullPointerException
at
org.apache.cocoon.pipeline.util.URLConnectionUtils.closeQuietly(URLConnectionUtils.java:37)
at
org.apache.cocoon.rest.controller.response.URLResponse.execute(URLResponse.java:91)
at
org.apache.cocoon.rest.controller.SpringRESTController.invoke(SpringRESTController.java:88)
at
org.apache.cocoon.controller.SpringControllerComponent.execute(SpringControllerComponent.java:50)
at
org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:147)
at
org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

It is certainly not closing a connection quietly :-) 

In URLResponse.java, is it possible that in execute()

servletConnection = this.url.openConnection(); is null?

Responses are like:
   if (action.equals(st)) return new
URLResponse(servlet:/thesaurusedit/stdemo,data);
if (action.equals(term)) return new
URLResponse(servlet:/edit/term, data);
}

return new URLResponse(servlet:editor/workspace, data);

Is there an obvious mistake I am making?

Thanks,
Jos


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



Re: URLConnectionUtils.closeLoudly()

2009-12-04 Thread Jos Snellings
You are right in literal.equals(param), but that is not the source of
the problem. Like smoking, it is a habit I'd better give up ;-)
Jos

On Fri, 2009-12-04 at 15:29 +0100, Johannes Lichtenberger wrote:
 On Fri, 2009-12-04 at 15:15 +0100, Jos Snellings wrote:
 
 [StackTrace]
 
  It is certainly not closing a connection quietly :-) 
  
  In URLResponse.java, is it possible that in execute()
  
  servletConnection = this.url.openConnection(); is null?
  
  Responses are like:
 if (action.equals(st)) return new
  URLResponse(servlet:/thesaurusedit/stdemo,data);
  if (action.equals(term)) return new
  URLResponse(servlet:/edit/term, data);
  }
  
  return new URLResponse(servlet:editor/workspace, data);
 
 Well, you know I'm not really familiar with cocoon, but I would replace
 action.equals(st) with st.equals(action) and action.equals(term)
 equally, so you can't get NullPointerExceptions in this place (I know
 it's not the source of the problem).
 
 greetings,
 Johannes  
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: URLConnectionUtils.closeLoudly()

2009-12-04 Thread Jos Snellings
This is one for documentation:
from the examples:
URLResponse(servlet:/somewherehere,data)

does not work if you specify the root url.
Notation is absolute (with servlet:)

if /somewherehere is in the same pipeline it works!

However, closeQuietly does not close quietly if the urlconnection is
null. The exception is thrown by the method and caught in the caller.
That is the silent part.

Jos


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



Re: configuring Jetty to log into a file

2009-12-06 Thread Jos Snellings
Look for any log4j.xml or log4j.properties in the classpath.
There is a log4j.xml in the cocoon samples
in ./rcl-config/WEB-INF/log4j.xml. A log file is created in  param
name=File value=./target/work/log/cocoon.log/
Jos

On Sun, 2009-12-06 at 22:39 +0100, Johannes Lichtenberger wrote:
 Well, it's maybe not really cocoon specific, but I use mvn jetty:run to
 run jetty and I'm getting an Error in a recursive function so the stack
 trace is too long to follow in my shell. Does perhaps someone know how
 to configure jetty to log stacktraces in a file?
 
 greetings,
 Johannes
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: escaping special characters in an XSP String

2009-12-07 Thread Jos Snellings
Hi Paul,

Can you please explain the purpose of not escaping?
Do you want for instance to prevent ampersand from being converted to
amp; ?

Best,
Jos



On Mon, 2009-12-07 at 13:21 +, Paul Adriaenssens wrote:
 Hi,
 
 I want to avoid escaping special characters in an xsp String retrieved
 through xsp:expr.
 
 In the archives
 
 http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg20263.html
 https://webmail.ua.ac.be/exchweb/bin/redir.asp?URL=http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg20263.html
 
 http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg16145.html
 https://webmail.ua.ac.be/exchweb/bin/redir.asp?URL=http://www.mail-archive.com/cocoon-us...@xml.apache.org/msg16145.html
 
 I found this as a solution:
 
 util:include-expr
 util:exprxsp:expr
 data
 /xsp:expr/util:expr
 /util:include-expr
 
 However it does not work, I see nothing in the output!
 
 Any ideas?
 
 We are using cocoon 2.1.11 ...
 
 Regards,
 
 Paul Adriaenssens
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



character encoding of a HttpServletRequest

2010-01-08 Thread Jos Snellings
Hi,

HttpServletRequest looks 'imperfect':
Cocoon 3, alpha 2.
A generator accesses the HttpServletRequest in the setup method:

request = HttpContextHelper.getRequest(parameters);
text = request.getParameter(tekst);

The pages, including forms are ecoded in utf-8.
The String 'text' is strange: the original content (utf-8) is encoded
once again:
if the string on the form was one character, say 'é', the string has a
length of 4 bytes. It is the result of utf-8 encoding the two byte
character coming from the client. So, a second conversion is happening.

Now:
new String(request.getParameter(text).getBytes(ISO-8859-1)) works
fine.

Where should this be corrected?

Cheers,
Jos


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



Re: character encoding of a HttpServletRequest

2010-01-10 Thread Jos Snellings
This is not a specific cocoon issue, I believe. It probably has to do
with Tomcat 5.5.27.
request.setCharacterEncoding simply does not work; it does not change a
thing.
request.getCharacterEncoding returns nothing.

Best,
Jos


On Sat, 2010-01-09 at 08:01 +0100, Jos Snellings wrote:
 Hi,
 
 HttpServletRequest looks 'imperfect':
 Cocoon 3, alpha 2.
 A generator accesses the HttpServletRequest in the setup method:
 
 request = HttpContextHelper.getRequest(parameters);
 text = request.getParameter(tekst);
 
 The pages, including forms are ecoded in utf-8.
 The String 'text' is strange: the original content (utf-8) is encoded
 once again:
 if the string on the form was one character, say 'é', the string has a
 length of 4 bytes. It is the result of utf-8 encoding the two byte
 character coming from the client. So, a second conversion is happening.
 
 Now:
 new String(request.getParameter(text).getBytes(ISO-8859-1)) works
 fine.
 
 Where should this be corrected?
 
 Cheers,
 Jos
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: character encoding of a HttpServletRequest

2010-01-11 Thread Jos Snellings
Thanks, I will try CharacterEncodingFilter!
I will lookup in the code were filtering takes place, because the
problem is rather that it looks like the form data are filtered twice. 

In addition, do I remember right that there used to be a cocoon servlet
setting, 
init-param
param-nameform-encoding/param-name
param-valueUTF-8/param-value
/init-param

Cheers, thanks for the hint. I will post the result... I will certainly
not be the only person who is confronted with this problem.

Jos


On Mon, 2010-01-11 at 08:54 +, Dominic Mitchell wrote:
 2010/1/10 Jos Snellings jos.snelli...@pandora.be
 This is not a specific cocoon issue, I believe. It probably
 has to do
 with Tomcat 5.5.27.
 request.setCharacterEncoding simply does not work; it does not
 change a
 thing.
 request.getCharacterEncoding returns nothing.
 
 You have to call request.setCharacterEncoding() really early for it to
 have any impact.  Your best bet is to look at spring's
 CharacterEncodingFilter.  You can add that to your web.xml to get the
 character set defined very early on.
 
 -Dom 
 
 



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



Re: character encoding of a HttpServletRequest

2010-01-11 Thread Jos Snellings
This, to notify you that the solution you suggested works fine:
So, for all cocoon users: if you are experiencing problems with the
character encoding of POST form data (which is very likely to occur):
the problem is generally cured by
Inserting the following code in web.xml

filter
filter-nameencodingFilter/filter-name

filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
init-param
param-nameforceEncoding/param-name
param-valuetrue/param-value
/init-param
 /filter

 filter-mapping
filter-nameencodingFilter/filter-name
url-pattern/*/url-pattern
 /filter-mapping

(Insert it as the first children under the web-app root element)

Jos


On Mon, 2010-01-11 at 08:54 +, Dominic Mitchell wrote:
 2010/1/10 Jos Snellings jos.snelli...@pandora.be
 This is not a specific cocoon issue, I believe. It probably
 has to do
 with Tomcat 5.5.27.
 request.setCharacterEncoding simply does not work; it does not
 change a
 thing.
 request.getCharacterEncoding returns nothing.
 
 You have to call request.setCharacterEncoding() really early for it to
 have any impact.  Your best bet is to look at spring's
 CharacterEncodingFilter.  You can add that to your web.xml to get the
 character set defined very early on.
 
 -Dom 
 
 



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



Re: character encoding of a HttpServletRequest

2010-01-11 Thread Jos Snellings
That is right!
It is just a confusing situation :-(
The filter works fine. The init() method of a generator does not give a
chance to call setCharacterEncoding, as the parsing already happened.
The good thing is that the code is already in spring, so, no new
external dependencies. Maybe later on I add a
tryToGuessEncodingFilter.

Jos

On Mon, 2010-01-11 at 10:49 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Hi,
  
  HttpServletRequest looks 'imperfect':
  Cocoon 3, alpha 2.
  A generator accesses the HttpServletRequest in the setup method:
  
  request = HttpContextHelper.getRequest(parameters);
  text = request.getParameter(tekst);
  
  The pages, including forms are ecoded in utf-8.
  The String 'text' is strange: the original content (utf-8) is encoded
  once again:
  if the string on the form was one character, say 'é', the string has a
  length of 4 bytes. It is the result of utf-8 encoding the two byte
  character coming from the client. So, a second conversion is happening.
  
  Now:
  new String(request.getParameter(text).getBytes(ISO-8859-1)) works
  fine.
  
  Where should this be corrected?
 
 Jos,
 
 in Cocoon 3 there isn't any code that changes the encoding of request
 parameters. The plain HttpServletRequest as provided by the servlet
 container is used.
 
 IIRC Tomcat uses ISO-8859-1 by default which follows the recommendation
 of the Servlet API spec:
 
 ~~~
 SRV.4.9 Request data encoding
 Currently, many browsers do not send a char encoding qualifier with the
 Content-Type header, leaving open the determination of the character
 encoding for reading HTTP requests. The default encoding of a request
 the container uses to create the request reader and parse POST data must
 be “ISO-8859-1” if none has been specified by the client request.
 However, in order to indicate to the developer in this case the failure
 of the client to send a character encoding, the container returns null
 from the getCharacterEncoding method.
 If the client hasn’t set character encoding and the request data is
 encoded with a different encoding than the default as described above,
 breakage can occur. To remedy this situation, a new method
 setCharacterEncoding(String enc) has been added to the ServletRequest
 interface. Developers can override the character encoding supplied by
 the container by calling this method. It must be called prior to parsing
 any post data or reading any input from the request. Calling
 this method once data has been read will not affect the encoding.
 ~~~
 
 So as some others suggested, the best option is using one of the
 CharecterEncoding servlet filters and not to remedy this situation
 somewhere in C3.
 



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



Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-02 Thread Jos Snellings
Hi Gabriel,

Very strange to have that exception there!
When does it happen? Is it predictable?

Kind regards,
Jos

On Tue, 2010-02-02 at 19:44 +0100, Gabriel Gruber wrote:
 
 Hello comunity, 
 
 I found a serious bug in JNET / servlet service framework in our
 cocoon 2.2 based application. After some time the following Exception
 pops up and the only way to resolve is to restart the web
 application... 
 
 
 java.lang.NullPointerException
 java.util.LinkedList.remove(LinkedList.java:646)
 java.util.LinkedList.remove(LinkedList.java:360)
 
 org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory.pop(DynamicURLStreamHandlerFactory.java:30)
 
 org.apache.cocoon.jnet.URLHandlerFactoryCollector.popUrlHandlerFactories(URLHandlerFactoryCollector.java:57)
 
 org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:39)
 sun.reflect.GeneratedMethodAccessor516.invoke(Unknown
 Source)
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 
 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
 
 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
 
 org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
 
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 $Proxy34.service(Unknown Source)
 org.apache.cocoon.servletservice.ServletServiceContext
 $PathDispatcher.forward(ServletServiceContext.java:481)
 org.apache.cocoon.servletservice.ServletServiceContext
 $PathDispatcher.forward(ServletServiceContext.java:455)
 
 org.apache.cocoon.servletservice.spring.ServletFactoryBean
 $ServiceInterceptor.invoke(ServletFactoryBean.java:245)
 
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 $Proxy94.service(Unknown Source)
 
 org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
 org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
 
 Any Ideas? 
 
 I found a Jira Thread of another project using cocoon and having
 similar problems... 
 http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
  
 
 cheers, 
 
 Gabriel



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



Re: Strange encoding problem using forms

2010-02-11 Thread Jos Snellings
The two tomcat versions on the machines are the same, but, can you
please make a diff between the two server.xml under $CATALINA_HOME/conf?
Just to be sure ...

Jos

On Thu, 2010-02-11 at 11:47 +0100, Søren Krum wrote:
 Hello!
 
 I have a small problem with a cocoon application and forms.
 
 The application runs fine on one machine, but for some reason we want to
 have a mirror of that machine. Higg Avalability and failover...
 
 And here some more details: The part failing is a simple form build up
 via cocoon forms (we are using cocoon 2.2), where in the first screen
 the user has some possibilities to enter data, and in the second screen,
 these data get presented to confirm them before they are comitted. The
 cocoon flow is used to transfer the data from first to second screen and
 further on to the third.
 
 Entering some special characters like ö or øæå works fine on the one
 machine but not on the other. We tried to build up the two machines as
 alike as possible, the locale is the same, the tomcat and java versions
 are the same, the physical machine are the same, teh application is
 packed as a war and deployed on the same way.
 
 Anyone an idea what could be lead to the trouble? Even a guess is nice,
 running out of ideas here... It looks like it caused by wrong
 interpretation of the parameters send with the request, but why are they
 interpreted differently?
 
 The failure we get reads like the following:
 
 org.apache.cocoon.ProcessingException: Failed to process pipeline
   at map:serialize -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:117:28
   at map:transform type=xslt -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:111:111
   at map:transform type=xslt -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:108:69
   at map:generate type=jx -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:107:68
   at map:match -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:106:50
   at map:act type=cauth-is-logged-in -
 file:///site/apps/apache-tomcat-6.0.20/work/portalen-forms/aksessliste/sitemap.xmap:42:42
 
   at
 org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)
   at
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:923)
   at
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
   at
 org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273)
   at
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439)
   at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at
 org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
   at $Proxy31.process(Unknown Source)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
   at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
   at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:123)
   at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
   at
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
   at
 org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
   at
 org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
   at
 org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:316)
   at
 org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:366)
   at
 org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:62)
   at
 org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:201)
   at
 

Cocoon 3 XML serializer

2010-03-02 Thread Jos Snellings
Hi,

Is the hereunder described issue with XML serializers known?

A sitemap having several xml serialization patterns:

  map:pipeline
  map:match pattern=showterm.xml
map:generate type=term/ 
map:serialize type=xml/
  /map:match
   map:match pattern=hierarchies
map:generate type=topterms/ 
map:serialize type=xml /
   /map:match

   ...

This pipeline is observed to have an 'eternal cache':
whichever pattern is matched first gives the correct answer.
All subsequent requests, whatever the URL, whatever the get-parameters
return the contents of the cache.

In order to get fresh results you need to destroy the caching stuff
under work/... first.

Is this known? I may as well get rid of it by checking out the very last
cocoon-3 version! Just asking.

Thank you,
Jos


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



RE: Type 'jsp' does not exist for 'map:generate'

2010-03-03 Thread Jos Snellings
Hi Venura,

Mmm, first I redirect this discussion to users@cocoon.apache.org, for
that is the appropriate group.
Next I would suggest to send the contents of your cocoon.xconf. There
may be a declaration missing there.

Jos

On Wed, 2010-03-03 at 14:37 +0530, Venura Kahawala wrote:
 Hi Jos,
 
 Thanks a lot for the reply
 
 But in the bellow link it says that Jsp can be used as a generator
 http://cocoon.apache.org/2.1/userdocs/jsp-generator.html
 
 I latter added the bellow part to my sitemap.xmap file. 
 map:components
 map:generators default=file
 map:generator name=jsp src=intro/
 
 /map:generators
 /map:components
 
 So my new sitemap file looks like this,
 
 map:sitemap xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://apache.org/cocoon/sitemap/1.0 
 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd;
  xmlns:map=http://apache.org/cocoon/sitemap/1.0;
  xmlns:avalon=http://cocoon.apache.org/schema/avalon;
 
 map:components
 map:generators default=file
 map:generator name=jsp src=intro/
 
 /map:generators
 /map:components
 
 map:flow language=javascript/
 map:pipelines
 map:pipeline id=demo
 map:match pattern=test
 map:generate type=jsp /
 map:transform src=demo/welcome.xslt/
 map:serialize type=xhtml/
 /map:match
 /map:pipeline
 /map:pipelines
 /map:sitemap
 
 This avoids the Type 'jsp' does not exist for 'map:generate' error. Here 
 intro is the jsp file and it returns the simple xml formatted string.
 But when I enter the  http://localhost:/ical/test; in the browser it now 
 gives the following error,
 
 javax.servlet.ServletException: 
 org.springframework.beans.factory.BeanDefinition
 StoreException: Unable to read Avalon configuration from 'sitemap.xmap' .; 
 nested
  exception is 
 org.apache.avalon.framework.configuration.ConfigurationException:
 Unable to create class for component with role 
 org.apache.cocoon.generation.Gene
 rator/jsp with class: intro
 
 Appreciate any advise,
 Thanks and regards,
 Venura.
 
 
 -Original Message-
 From: Jos Snellings [mailto:jos.snelli...@pandora.be] 
 Sent: Wednesday, March 03, 2010 1:57 PM
 To: d...@cocoon.apache.org
 Subject: Re: Type 'jsp' does not exist for 'map:generate'
 
 Hi again,
 
 I am sorry. xsp does not exist anymore from 2.2. My mistake.
 I responded in haste.
 
 Jos
 
 On Wed, 2010-03-03 at 09:21 +0100, Jos Snellings wrote:
  Hi,
  
  Maybe you mean: 
  generate type=xsp src=intro.xsp/
  
  an xsp page is a special variant of a jsp page. 
  
  As far as I know, plain jsp does not fit in cocoon.
  
  Cheers
  
  
  On Wed, 2010-03-03 at 12:25 +0530, Venura Kahawala wrote:
   Hi,
   

   
   For cocoon 2.2, with maven, I have this pipeline in my experimental 
   sitemap-file:
   map:sitemap xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://apache.org/cocoon/sitemap/1.0 
   http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd;
xmlns:map=http://apache.org/cocoon/sitemap/1.0; 
   map:flow language=javascript/
   
   map:pipelines
   map:match pattern=intro.jsp
   map:generate type=jsp src=intro.jsp/
   map:transform src=demo/welcome.xslt/
   map:serialize type=xhtml/
   /map:match
   /map:pipeline 

   /map:sitemap

   When I run the maven command “mvn jetty-run” I get the following error

   Caused by: 
   org.apache.avalon.framework.configuration.ConfigurationException: Ty
   e 'jsp' does not exist for 'map:generate'

   Is there something missing in my sitemap? Or is there something I have to 
   do with maven or do I have to add some
   other configurations. And if there are other configurations please advise 
   me where I can find those files in my application. Please advise me.
   Greetings and thanks for helping!
   Venura.
   

   
   
  
  
  
 
 
 
 



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



Re: Cocoon 3 XML serializer

2010-03-04 Thread Jos Snellings
I have just checked out revision 918886.
As my version was a bit out of date, in order to limit the increase in
enthropy, I will make a build and report back if the problem persist. If
so I create a Jira issue.

Cheers,
Jos

On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Hi,
  
  Is the hereunder described issue with XML serializers known?
  
  A sitemap having several xml serialization patterns:
  
map:pipeline
map:match pattern=showterm.xml
  map:generate type=term/ 
  map:serialize type=xml/
/map:match
 map:match pattern=hierarchies
  map:generate type=topterms/ 
  map:serialize type=xml /
 /map:match
  
 ...
  
  This pipeline is observed to have an 'eternal cache':
  whichever pattern is matched first gives the correct answer.
  All subsequent requests, whatever the URL, whatever the get-parameters
  return the contents of the cache.
  
  In order to get fresh results you need to destroy the caching stuff
  under work/... first.
  
  Is this known? I may as well get rid of it by checking out the very last
  cocoon-3 version! Just asking.
 
 Could you create a JIRA issue please and attach a failing sample please?
  Also add the version of C3 (release or SVN revision) that you use.
 
 Thanks!
 



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



Re: Cocoon 3 XML serializer

2010-03-04 Thread Jos Snellings
Hi!

In the full checkout of the cocoon-3 SVN repository I am missing:
org.apache.cocoon.sax.xpointer.XPointerFrameworkParser;
org.apache.cocoon.sax.xpointer.ParseException;

This prevents XIncludeTransformer from compiling. Any idea why?

Jos


On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote:
 Jos Snellings wrote:
  Hi,
  
  Is the hereunder described issue with XML serializers known?
  
  A sitemap having several xml serialization patterns:
  
map:pipeline
map:match pattern=showterm.xml
  map:generate type=term/ 
  map:serialize type=xml/
/map:match
 map:match pattern=hierarchies
  map:generate type=topterms/ 
  map:serialize type=xml /
 /map:match
  
 ...
  
  This pipeline is observed to have an 'eternal cache':
  whichever pattern is matched first gives the correct answer.
  All subsequent requests, whatever the URL, whatever the get-parameters
  return the contents of the cache.
  
  In order to get fresh results you need to destroy the caching stuff
  under work/... first.
  
  Is this known? I may as well get rid of it by checking out the very last
  cocoon-3 version! Just asking.
 
 Could you create a JIRA issue please and attach a failing sample please?
  Also add the version of C3 (release or SVN revision) that you use.
 
 Thanks!
 



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



Re: Cocoon 3 XML serializer

2010-03-04 Thread Jos Snellings
Hi Simone!

I am sorry, I do not use maven for the build.
I imported the sources as Eclipse projects, and from there I
interconnected them via dependencies. I just import the very external
stuff from the maven repository.
Ay, so you mean this is where my 'nice private build' ends? :-(

Ciao,
Jos

On Thu, 2010-03-04 at 12:34 +0100, Simone Tripodi wrote:
 Hi Jos,
 these classes are not committed because they're generated from JavaCC,
 the JavaCC plugin should be invoked during the 'generate-source' maven
 phase...
 Doesn't it work for you?
 Best,
 Simo
 
 http://people.apache.org/~simonetripodi/
 
 
 
 On Thu, Mar 4, 2010 at 11:04 AM, Jos Snellings jos.snelli...@pandora.be 
 wrote:
  Hi!
 
  In the full checkout of the cocoon-3 SVN repository I am missing:
  org.apache.cocoon.sax.xpointer.XPointerFrameworkParser;
  org.apache.cocoon.sax.xpointer.ParseException;
 
  This prevents XIncludeTransformer from compiling. Any idea why?
 
  Jos
 
 
  On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote:
  Jos Snellings wrote:
   Hi,
  
   Is the hereunder described issue with XML serializers known?
  
   A sitemap having several xml serialization patterns:
  
 map:pipeline
 map:match pattern=showterm.xml
   map:generate type=term/
   map:serialize type=xml/
 /map:match
  map:match pattern=hierarchies
   map:generate type=topterms/
   map:serialize type=xml /
  /map:match
  
  ...
  
   This pipeline is observed to have an 'eternal cache':
   whichever pattern is matched first gives the correct answer.
   All subsequent requests, whatever the URL, whatever the get-parameters
   return the contents of the cache.
  
   In order to get fresh results you need to destroy the caching stuff
   under work/... first.
  
   Is this known? I may as well get rid of it by checking out the very last
   cocoon-3 version! Just asking.
 
  Could you create a JIRA issue please and attach a failing sample please?
   Also add the version of C3 (release or SVN revision) that you use.
 
  Thanks!
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: Writing generator / Cocoon3 alpha

2010-03-05 Thread Jos Snellings
Johannes, you need one or two things beside the code of the generator.
- first, how is it invoked? Can you send the fragment of your
sitemap.xmap that matches an url supposed to invoke this generator?
- second, is there a line in sitemap-components that defines this
generator?

Best,
Jos

On Sat, 2010-03-06 at 03:40 +0100, Johannes Lichtenberger wrote:
 Hi,
 
 I've got a (maybe rather simple) problem, but somehow the
 exectute()-method isn't going to be invoked. I can see, that my
 generator is, because I simply created a static-Block with a sysout
 statement.
 
 But
 
   /**
* {...@inheritdoc}
*/
   public void execute() {
 try {
   System.out.println(blaa);
   ...
 
 blaa isn't printed on STDOUT :-/ (Jap, I know, I'll use the logger
 for further debugging ;-)
 
 Do you have any idea? The definition of the class is:
 
 public class SAXGenerator extends AbstractSAXGenerator implements
 CachingPipelineComponent
 
 greetings,
 Johannes
 
 p.s.: I wonder why you have abstract classes which define nothing at all
 like AbstractSAXGenerator and AbstractSAXPipelineComponent.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: Cocoon 3 XML serializer

2010-03-06 Thread Jos Snellings
After a complete rebuild this error has been confirmed:
caching for xml serializer works way too 'well':
after startup, any pipeline/matcher ending in an xml-serializer will
produce the same output, regardless of the url, let alone parameters.
I will create a JIRA issue and see what I can do.

Cheers,
Jos


On Thu, 2010-03-04 at 09:36 +0100, Jos Snellings wrote:
 I have just checked out revision 918886.
 As my version was a bit out of date, in order to limit the increase in
 enthropy, I will make a build and report back if the problem persist. If
 so I create a Jira issue.
 
 Cheers,
 Jos
 
 On Thu, 2010-03-04 at 07:36 +0100, Reinhard Pötz wrote:
  Jos Snellings wrote:
   Hi,
   
   Is the hereunder described issue with XML serializers known?
   
   A sitemap having several xml serialization patterns:
   
 map:pipeline
 map:match pattern=showterm.xml
   map:generate type=term/ 
   map:serialize type=xml/
 /map:match
  map:match pattern=hierarchies
   map:generate type=topterms/ 
   map:serialize type=xml /
  /map:match
   
  ...
   
   This pipeline is observed to have an 'eternal cache':
   whichever pattern is matched first gives the correct answer.
   All subsequent requests, whatever the URL, whatever the get-parameters
   return the contents of the cache.
   
   In order to get fresh results you need to destroy the caching stuff
   under work/... first.
   
   Is this known? I may as well get rid of it by checking out the very last
   cocoon-3 version! Just asking.
  
  Could you create a JIRA issue please and attach a failing sample please?
   Also add the version of C3 (release or SVN revision) that you use.
  
  Thanks!
  
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: [jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all

2010-03-09 Thread Jos Snellings
Yes, Reinhard, I agree very much with the observation that everything
that influences the output must go in the cache key.
OK, I use the user group again, because I am convinced that this will be
of use to the whole cocoon community: here I go.

I write a cocoon Generator. It extends AbstractSAXGenerator and
implements CachingPipelineComponent. In order to make good use of the
caching mechanism, we use a ParameterCacheKey, whereby we will use the
request parameters to construct the cache key. This makes sense.

Consider the methods setup() and constructCacheKey:

public void setup(MapString, Object parameters) {
 request = HttpContextHelper.getRequest(parameters);
 session = request.getSession(true); 
 
}

and

public CacheKey constructCacheKey() {
   if (request == null) {
System.out.println(Sapperment: request is null when
constructCacheKey is called...);
}
MapString,String parameters = request.getParameterMap();
ParameterCacheKey cacheKey = new ParameterCacheKey(parameters);
return cacheKey;
}


It is observed now that constructCachekey is called before setup is. :-(
What to do? 
Let's find a way and put it as recommended practice, for this will
affect virtually any future cocoon app.
Ideas?

Jos



 Reinhard Poetz commented on COCOON3-53:
 ---
 
 The cache key has to contain everything that influences the output produced 
 by the generator.
 
 I have no idea why HTML serialization makes a difference, but again, the logs 
 should give you some hints.
 
  Cocoon 3: XMLSerializer caches all
  --
 
  Key: COCOON3-53
  URL: https://issues.apache.org/jira/browse/COCOON3-53
  Project: Cocoon 3
   Issue Type: Bug
   Components: cocoon-pipeline
 Reporter: Jos Snellings
 
  After startup, any pipeline/matcher ending in an xml-serializer will
  produce the output of the first request after server startup, regardless of 
  the url, let alone parameters.
  So the first xml pipe that is activated produces the expected output.
  All subsequent calls will echo that output, whatever the url or parameters.
  It takes a server restart to make a pipeline ending in an xml serializer 
  work again.
 



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



HOLD PREVIOUS MESSAGE

2010-03-09 Thread Jos Snellings
Please put this message on hold. I might have expressed myself in haste.
First I need to perform another test!
Jos
On Tue, 2010-03-09 at 13:17 +0100, Jos Snellings wrote:
 Yes, Reinhard, I agree very much with the observation that everything
 that influences the output must go in the cache key.
 OK, I use the user group again, because I am convinced that this will be
 of use to the whole cocoon community: here I go.
 
 I write a cocoon Generator. It extends AbstractSAXGenerator and
 implements CachingPipelineComponent. In order to make good use of the
 caching mechanism, we use a ParameterCacheKey, whereby we will use the
 request parameters to construct the cache key. This makes sense.
 
 Consider the methods setup() and constructCacheKey:
 
 public void setup(MapString, Object parameters) {
request = HttpContextHelper.getRequest(parameters);
session = request.getSession(true); 

   }
   
 and
 
 public CacheKey constructCacheKey() {
if (request == null) {
   System.out.println(Sapperment: request is null when
 constructCacheKey is called...);
   }
   MapString,String parameters = request.getParameterMap();
   ParameterCacheKey cacheKey = new ParameterCacheKey(parameters);
   return cacheKey;
   }
 
 
 It is observed now that constructCachekey is called before setup is. :-(
 What to do? 
 Let's find a way and put it as recommended practice, for this will
 affect virtually any future cocoon app.
 Ideas?
 
 Jos
 
 
 
  Reinhard Poetz commented on COCOON3-53:
  ---
  
  The cache key has to contain everything that influences the output produced 
  by the generator.
  
  I have no idea why HTML serialization makes a difference, but again, the 
  logs should give you some hints.
  
   Cocoon 3: XMLSerializer caches all
   --
  
   Key: COCOON3-53
   URL: https://issues.apache.org/jira/browse/COCOON3-53
   Project: Cocoon 3
Issue Type: Bug
Components: cocoon-pipeline
  Reporter: Jos Snellings
  
   After startup, any pipeline/matcher ending in an xml-serializer will
   produce the output of the first request after server startup, regardless 
   of the url, let alone parameters.
   So the first xml pipe that is activated produces the expected output.
   All subsequent calls will echo that output, whatever the url or 
   parameters.
   It takes a server restart to make a pipeline ending in an xml serializer 
   work again.
  
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



ParameterCacheKey for a Generator.

2010-03-09 Thread Jos Snellings
It is herewith confirmed that pipelinecompont.setup() is called before
constructCacheKey! (see CachingPipeline.setup().
The nullpointerexception I observed stemmed from a class inheritance
(forgot super.setup() in one of the participating generators).

Cheers,
Jos


On Tue, 2010-03-09 at 13:25 +0100, Jos Snellings wrote:
 Please put this message on hold. I might have expressed myself in haste.
 First I need to perform another test!
 Jos
 On Tue, 2010-03-09 at 13:17 +0100, Jos Snellings wrote:
  Yes, Reinhard, I agree very much with the observation that everything
  that influences the output must go in the cache key.
  OK, I use the user group again, because I am convinced that this will be
  of use to the whole cocoon community: here I go.
  
  I write a cocoon Generator. It extends AbstractSAXGenerator and
  implements CachingPipelineComponent. In order to make good use of the
  caching mechanism, we use a ParameterCacheKey, whereby we will use the
  request parameters to construct the cache key. This makes sense.
  
  Consider the methods setup() and constructCacheKey:
  
  public void setup(MapString, Object parameters) {
   request = HttpContextHelper.getRequest(parameters);
   session = request.getSession(true); 
   
  }
  
  and
  
  public CacheKey constructCacheKey() {
 if (request == null) {
  System.out.println(Sapperment: request is null when
  constructCacheKey is called...);
  }
  MapString,String parameters = request.getParameterMap();
  ParameterCacheKey cacheKey = new ParameterCacheKey(parameters);
  return cacheKey;
  }
  
  
  It is observed now that constructCachekey is called before setup is. :-(
  What to do? 
  Let's find a way and put it as recommended practice, for this will
  affect virtually any future cocoon app.
  Ideas?
  
  Jos
  
  
  
   Reinhard Poetz commented on COCOON3-53:
   ---
   
   The cache key has to contain everything that influences the output 
   produced by the generator.
   
   I have no idea why HTML serialization makes a difference, but again, the 
   logs should give you some hints.
   
Cocoon 3: XMLSerializer caches all
--
   
Key: COCOON3-53
URL: https://issues.apache.org/jira/browse/COCOON3-53
Project: Cocoon 3
 Issue Type: Bug
 Components: cocoon-pipeline
   Reporter: Jos Snellings
   
After startup, any pipeline/matcher ending in an xml-serializer will
produce the output of the first request after server startup, 
regardless of the url, let alone parameters.
So the first xml pipe that is activated produces the expected output.
All subsequent calls will echo that output, whatever the url or 
parameters.
It takes a server restart to make a pipeline ending in an xml 
serializer work again.
   
  
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
  
  
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 



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



Re: use cocoon framework to manage static content

2010-03-17 Thread Jos Snellings
Hi Sumit,

If I understand your story well, you are facing a rapid publication
problem. The marketing department delivers data not in XML format.
I do not see directy a great added value in bringing cocoon in the
scheme.

My suggestion is to check out some web content management productivity
tool. Consider:
- Drupal
- Joomla

With wich you could address the marketing department questions sweetly.

Some other people in this group may have other/better/pure java
suggestions.

Cheers,
Jos



On Wed, 2010-03-17 at 15:14 +0530, Sumit Saini wrote:
 Hi All,
 
 I am new to cocoon and want to use this framework for my web
 application .
 
 I am developing a web application using Spring/Hibernate frameworks.
 My application is going to be a public facing application. The pages
 on this application can be divided into categories. Pre-login  Post
 login.
 
  
 
 Pre-Login pages: These are mainly going to be marketing/user education
 pages. These are HTMLs/Jsps with el tags.
 
  
 
 Post-Login pages: These are main application pages which are pure JSPs
 with EL tags.
 
  
 
 Since app has been launched, marketing team puts pressure on us to
 change the content on the pre-login pages on almost daily basis.
 Currently, we are handling this by sending the static files to the
 remote static server.
 
  
 
 I want to streamline this process. The above one is tedious for
 changing the content as presentation is mixed with content. Often this
 results in errors  reworks.
 
  
 
 Can I make use of Cocoon or some other XML based approach to address
 this issue? I want, at least for static pages, to keep the
 presentation code on static pages separate from content. This can
 enable the marketing team to write content in simple text files, which
 eventually can be uploaded to the server.
 
  
 
 Please suggest how can I achieve this using cocoon.  I wish for
 following: A simple text file upload and then on the basis of EL tags
 on the JSPs, content gets reflected on the pages of the running
 application.
 
  
 
 Rgds
 Sumit 
 
  
 
 



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



Re: Bug in Cocoon-Caching?

2010-03-22 Thread Jos Snellings
This was not a bug. I observed that caching pipelines produce this only
if they end in an XML serialization. This behaviour was strange and
misleading.
However, the cause was the 'cacheKey' the generator returned was the
simpleCacheKey which had been sitting there from the examples.
Replacing SimpleCacheKey by ParameterCacheKey solved the problem.
Have a look at the routine! Maybe this removes your problem.
I suggested to replace this in the examples.

Hope this helps,
Jos



On Mon, 2010-03-22 at 21:33 +0100, Johannes Lichtenberger wrote: 
 I think it could be related to the bug Jos Snellings posted some time
 ago where always the first execution in pipeline with type=xml 
 serializers is beeing executed.
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 
 




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



Re: is possible to use jquery in coccon

2010-04-30 Thread Jos Snellings
This is rather a question for cocoon users.
Your answer: Yes it is!
It is something that is fundamentally possible, but I suggest you 
keep the bulk of your script in separate files, as constructs like
   $(#my_id).val('xsl:value-of select=@some_attribute/');
tend to cater for poor readability.

You may want to organise all your javascripts and static resources in
one pipeline.

Cheers,
Jos

On Fri, 2010-04-30 at 05:37 -0700, neotello wrote:
 i am new in cocoon my question is possibly stupid, but i not found the
 response in google... 
 is possible to use jquery's elements in cocoon??
 thank...



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



Re: Very large Generator file

2010-05-07 Thread Jos Snellings
Hi Jeff,

That depends a great deal on what you want to do exactly with the large
file. I guess you do not want to transform it into one huge web page?
In general, if you have to deal with lengthy inputs, a SAX pipeline is
the way to go.

Jos

On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote:
 Hello,
 
I was wondering if there’s a way to handle very large files as
 inputs to the default cocoon generator?  As it is, I am getting a
 memory heap error when trying to process an input file because it’s so
 large.  Am I going to have to process it in some other manner, or is
 there a way to make Cocoon perform the transform for me?
 
  
 
 Thanks,
 Jeff
 
 



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



RE: Very large Generator file

2010-05-10 Thread Jos Snellings
A SAX pipeline is part of cocoon.
Can you explain briefly what you want to do?
Consider using a cocoon-3 pipeline.
Consider using a SAX transformation:
- read xml
- do something with it (transforming, for instance)
- write output to a file

Jos

On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote:
 Correct, it's not being turned into a web page.  Is a SAX pipeline part of 
 Cocoon?  I'm still on Cocoon 2.1, but I've never heard that term 
 specifically, I thought the default generator did use SAX.  
 
  -Original Message-
  From: Jos Snellings [mailto:jos.snelli...@pandora.be]
  Sent: Saturday, May 08, 2010 12:06 AM
  To: users@cocoon.apache.org
  Subject: Re: Very large Generator file
  
  Hi Jeff,
  
  That depends a great deal on what you want to do exactly with the large
  file. I guess you do not want to transform it into one huge web page?
  In general, if you have to deal with lengthy inputs, a SAX pipeline is
  the way to go.
  
  Jos
  
  On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote:
   Hello,
  
  I was wondering if there’s a way to handle very large files as
   inputs to the default cocoon generator?  As it is, I am getting a
   memory heap error when trying to process an input file because it’s
  so
   large.  Am I going to have to process it in some other manner, or is
   there a way to make Cocoon perform the transform for me?
  
  
  
   Thanks,
   Jeff
  
  
  
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 



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



RE: Very large Generator file

2010-05-10 Thread Jos Snellings
Hi Jeff,

If you have been trying giving all the available memory to your tomcat
instance (JVM options) you are at the end of you tether for the current
solutions, unless somebody has a different idea.

I understood from your previous mail that the resulting xhtml is not for
on-line use, it is a sort of report/summary. 
If this is the case a short java program can make that xhtml file for
you.

Cheers,
Jos


On Mon, 2010-05-10 at 09:17 -0500, Schmitz, Jeffrey A wrote:
 Hi Jos,
I've already written my own Transformer (extends AbstractSAXTransformer) 
 that currently takes the output of the default cocoon xsl transformer (via 
 the sitemap) and performs subsequent, non-xsl transforms, writes the results 
 to file and generates the returned web-page  
 e.g.
   map:match pattern=*/*/*In/*/*In.flow/* 
  map:generate src=inputs/{4} /
  map:transform src=xsl/{3}InAdapter.xsl
 map:parameter name=instanceName value={2}/
  /map:transform
  map:transform type=SPARQLinTrans
 map:parameter name=inputFile value={4}/
 map:parameter name=SPARQLFlow value={5}/
  /map:transform
  map:serialize type=xhtml/
   /map:match
 
 I'm currently heading in the direction of just adding the initial xsl 
 transformation as part of my own Transformer's duties (I think your option 3) 
 so that it can hopefully handle the larger files, but I was wondering if 
 there might be a way to easily keep things as they are and continue using the 
 default cocoon xsl tranform as the first step.  Sounds like there's not?
 
 
  -Original Message-
  From: Jos Snellings [mailto:jos.snelli...@pandora.be]
  Sent: Monday, May 10, 2010 8:39 AM
  To: users@cocoon.apache.org
  Subject: RE: Very large Generator file
  
  A SAX pipeline is part of cocoon.
  Can you explain briefly what you want to do?
  Consider using a cocoon-3 pipeline.
  Consider using a SAX transformation:
  - read xml
  - do something with it (transforming, for instance)
  - write output to a file
  
  Jos
  
  On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote:
   Correct, it's not being turned into a web page.  Is a SAX pipeline
  part of Cocoon?  I'm still on Cocoon 2.1, but I've never heard that
  term specifically, I thought the default generator did use SAX.
  
-Original Message-
From: Jos Snellings [mailto:jos.snelli...@pandora.be]
Sent: Saturday, May 08, 2010 12:06 AM
To: users@cocoon.apache.org
Subject: Re: Very large Generator file
   
Hi Jeff,
   
That depends a great deal on what you want to do exactly with the
  large
file. I guess you do not want to transform it into one huge web
  page?
In general, if you have to deal with lengthy inputs, a SAX pipeline
  is
the way to go.
   
Jos
   
On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote:
 Hello,

I was wondering if there’s a way to handle very large files as
 inputs to the default cocoon generator?  As it is, I am getting a
 memory heap error when trying to process an input file because
  it’s
so
 large.  Am I going to have to process it in some other manner, or
  is
 there a way to make Cocoon perform the transform for me?



 Thanks,
 Jeff


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



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



RE: Very large Generator file

2010-05-10 Thread Jos Snellings
Yes, Jeff, my guess is that the tfactory stuff will accomplish the job
for you without complaining about memory shortage! Your tomcat instance
may have other things around increasing the memory footprint all the
time. 


On Mon, 2010-05-10 at 09:43 -0500, Schmitz, Jeffrey A wrote:
 Yes, the resulting XHTML file is not for online use.
 
 And yes, I've given max memory to the tomcat instance.  So, will having my 
 specialized transformer do the xsl transform directly using a SAX transformer 
 not work either?  e.g. something like:
 
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer transformer = tfactory.newTransformer(new StreamSource(
   xslID));
transformer.transform(new StreamSource(sourceFile), new StreamResult(
   new File(modelFile)));
 
 
 I guess I was under the impression that SAX based xsl transformers didn't use 
 much memory regardless file size, but perhaps that's not true?
 
 If that's not going to work, would moving to a 64 bit machine so I can give 
 more memory to Tomcat be an option (is there a 64 bit Tomcat)?  
 
  If this is the case a short java program can make that xhtml file for
  you.
 I'm not exactly sure what you're suggesting here.  Do you mean for the 
 tomcat/cocoon process to exec a separate java program that will do the xsl 
 transform on the large file?  Won't any java program come up against the 2 
 Gig max memory limitation?
 
 Thanks,
 Jeff
 
  -Original Message-
  From: Jos Snellings [mailto:jos.snelli...@pandora.be]
  Sent: Monday, May 10, 2010 9:30 AM
  To: users@cocoon.apache.org
  Subject: RE: Very large Generator file
  
  Hi Jeff,
  
  If you have been trying giving all the available memory to your tomcat
  instance (JVM options) you are at the end of you tether for the current
  solutions, unless somebody has a different idea.
  
  I understood from your previous mail that the resulting xhtml is not
  for
  on-line use, it is a sort of report/summary.
  If this is the case a short java program can make that xhtml file for
  you.
  
  Cheers,
  Jos
  
  
  On Mon, 2010-05-10 at 09:17 -0500, Schmitz, Jeffrey A wrote:
   Hi Jos,
  I've already written my own Transformer (extends
  AbstractSAXTransformer) that currently takes the output of the default
  cocoon xsl transformer (via the sitemap) and performs subsequent, non-
  xsl transforms, writes the results to file and generates the returned
  web-page
   e.g.
 map:match pattern=*/*/*In/*/*In.flow/* 
map:generate src=inputs/{4} /
map:transform src=xsl/{3}InAdapter.xsl
   map:parameter name=instanceName value={2}/
/map:transform
map:transform type=SPARQLinTrans
   map:parameter name=inputFile value={4}/
   map:parameter name=SPARQLFlow value={5}/
/map:transform
map:serialize type=xhtml/
 /map:match
  
   I'm currently heading in the direction of just adding the initial xsl
  transformation as part of my own Transformer's duties (I think your
  option 3) so that it can hopefully handle the larger files, but I was
  wondering if there might be a way to easily keep things as they are and
  continue using the default cocoon xsl tranform as the first step.
  Sounds like there's not?
  
  
-Original Message-
From: Jos Snellings [mailto:jos.snelli...@pandora.be]
Sent: Monday, May 10, 2010 8:39 AM
To: users@cocoon.apache.org
Subject: RE: Very large Generator file
   
A SAX pipeline is part of cocoon.
Can you explain briefly what you want to do?
Consider using a cocoon-3 pipeline.
Consider using a SAX transformation:
- read xml
- do something with it (transforming, for instance)
- write output to a file
   
Jos
   
On Mon, 2010-05-10 at 08:23 -0500, Schmitz, Jeffrey A wrote:
 Correct, it's not being turned into a web page.  Is a SAX
  pipeline
part of Cocoon?  I'm still on Cocoon 2.1, but I've never heard that
term specifically, I thought the default generator did use SAX.

  -Original Message-
  From: Jos Snellings [mailto:jos.snelli...@pandora.be]
  Sent: Saturday, May 08, 2010 12:06 AM
  To: users@cocoon.apache.org
  Subject: Re: Very large Generator file
 
  Hi Jeff,
 
  That depends a great deal on what you want to do exactly with
  the
large
  file. I guess you do not want to transform it into one huge web
page?
  In general, if you have to deal with lengthy inputs, a SAX
  pipeline
is
  the way to go.
 
  Jos
 
  On Fri, 2010-05-07 at 18:14 -0500, Schmitz, Jeffrey A wrote:
   Hello,
  
  I was wondering if there’s a way to handle very large
  files as
   inputs to the default cocoon generator?  As it is, I am
  getting a
   memory heap error when trying to process an input file
  because
it’s
  so

Re: how-to use xml catalog with apache cocoon 2.2

2010-05-25 Thread Jos Snellings
Hi Robby,

I have in cocoon.xconf:
  parameter name=catalog value=/resources/entities/catalog/^M
However, it is probably desirable to leave this default catalog
config
and declare your own local catalogs, which are loaded in addition to
the system catalog.
There are various ways to do local configuration (see Entity
Catalogs
documentation). One way is via the CatalogManager.properties file.
As an additional method, you can specify the local-catalog
parameter here.

local-catalog:
The full filesystem pathname to a single local catalog file.^M
   parameter name=local-catalog value=/usr/local/sgml/mycatalog/
verbosity:
The level of messages for status/debug (messages go to standard
output)^M
The following messages are provided ...^M
 0 = none^M
 1 = ? (... not sure yet)^M
 2 = 1+, Loading catalog, Resolved public, Resolved system^M
 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem^M
 10 = 3+, List all catalog entries when loading a catalog^M
(Cocoon also logs the Resolved public messages.) ^M
TODO: determine all messages at each level^M
   parameter name=verbosity value=2/^M

In addition, under webapp/WEB-INF/classes, there is
CatalogManager.properties, it looks like:
-
verbosity=1
# default
#  from webapps/cocoon/resources/entities/catalog^
# use full pathnames^M
# pathname separator is always semi-colon (;) regardless of operating
system^M
# directory separator is always slash (/) regardless of operating
system^M
#^M
#catalogs=/path/to/local/catalog
catalogs=/usr/local/catalina/webapps/sdx/herein.catalog
prefer=public
static-catalog=yes
allow-oasis-xml-catalog-pi=yes

And my catalog is in the web root of the application.

Hope this helps,
Jos





On Tue, 2010-05-25 at 12:14 +0200, Robby Pelssers wrote:
 Hi all,
 
 Just wondering if we have some online documentation explaining how to 
 configure Cocoon for using xml catalogs.
 
 Kind regards,
 Robby



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



Re: XSLT document(), logging URI resolver

2010-06-29 Thread Jos Snellings

Hi Lars,

I would say that the reference URI is the one of the xslt script itself.
So putting the document to fetch in the same directory should help.
A common problem is that there is uri-wise nothing to fetch:
if you use a relative URI, this would hide the fact that the protocol is 
http;
if you recompose the absolute URL from there, would there be a way that 
the document

would make it through the pipeline definitions in your sitemap?

Cheers,
Jos


On 06/29/2010 04:20 PM, Lars Huttar wrote:

Hello,

I'm wrestling with the following in Cocoon 2.1.11.

I have an XSLT that uses document() to retrieve a source document 
other than the one coming through the pipeline. I remember that the 
use of document() isn't encouraged in Cocoon, at least because Cocoon 
then doesn't know when to invalidate the cache for that pipeline. 
However, I don't have much choice in this case... the XSLT is someone 
else's. (It's the common XSLT implementation of Schematron, and I'd 
rather not modify it any more than I have to, because then upgrading 
it will be difficult.)


When I run this stylesheet, the document() call is apparently 
retrieving nothing. The argument to document() is a relative URI.
So I figure that between the base URI that is being used, and the 
relative URI (which is a simple filename.sch), the result is not a 
URI than Cocoon is able to resolve to the right file.
According to the XSLT spec, the base URI should be either the input 
document or the stylesheet, depending on where the relative URI comes 
from.

I believe it is considered to come from the input document in my case.
However I don't know what the XSLT processor considers to be the URI 
of its input document.


I think if I could turn on verbose logging of the URI resolver, I 
could find out what the XSLT processor thinks is the base URI, and 
then maybe fix the problem. But I can't get that to happen. Btw I've 
tried this with both xalan and Saxon for the XSLT processor.


I'm looking at
http://wiki.apache.org/cocoon/ConfiguringTheLogs
and
http://wiki.apache.org/cocoon/UnderstandingCocoonLogging
and I added a resolver target to logkit.xconf, and a category to 
send core.resolver messages to resolver.log file.
That works, for URLs processed by the sitemap: The file 
WEB-INF/logs/resolver.log appears and has content.
But there is no message for the xsl:include processed internally to 
the XSLT.


Maybe this is a Saxon / Xalan issue rather than a Cocoon issue. But 
the xsl:include works fine outside of Cocoon, e.g. in Oxygen. Granted, 
in that case I know what the URL of the input document is; it's a file 
URL. And the relative URL in the xsl:include works relative to the 
file URL of the input document.


Surprisingly, even when I gave xsl:include an absolute URL, e.g. 
http://localhost:8080/mount/...;, the document() statement seems to 
still fetch nothing.
This URL works fine in the browser (same machine). So this would 
suggest that the base URL of the input document is not the whole problem.


Can anybody suggest how to debug this?

Thanks,
Lars





Re: Problem using XSP pages

2010-09-07 Thread Jos Snellings

Hi, Shweta,

Please tell us first which version cocoon you deployed. Is that 2.2?

Cheers,
Jos

On 09/07/2010 07:46 AM, Shweta Singhai wrote:


Hi All,

This is Shweta, I am new in cocoon, I configured cocoon block with 
maven server ..and also with ant. For a simple block its working 
properly, but when I create a xsp file and try to run same as  simple 
xml file , then its not working, can any one tell me, is there any  
special setting or configuration require for xsp pages...??


Please help me in run and configuration of xsp pages.

Shweta Singhai

Technical Analyst

Ictect, Inc.

shweta.sing...@ictect.com

The IMPOSSIBLE is often UNTRIED





Re: Problem using XSP pages

2010-09-07 Thread Jos Snellings

OK, what further details have you got for us?

- logs? is something actually happening, going wrong?
- or do you see no trace of activity at all?
- what is in your sitemap.xmap?

Cheers,
Jos


On 09/07/2010 08:34 AM, Shweta Singhai wrote:


Hi Jos,

Yes its cocoon 2.2

*From:* Jos Snellings [mailto:jos.snelli...@pandora.be]
*Sent:* Tuesday, September 07, 2010 12:02 PM
*To:* users@cocoon.apache.org
*Subject:* Re: Problem using XSP pages

Hi, Shweta,

Please tell us first which version cocoon you deployed. Is that 2.2?

Cheers,
Jos

On 09/07/2010 07:46 AM, Shweta Singhai wrote:

Hi All,

This is Shweta, I am new in cocoon, I configured cocoon block with 
maven server ..and also with ant. For a simple block its working 
properly, but when I create a xsp file and try to run same as  simple 
xml file , then its not working, can any one tell me, is there any  
special setting or configuration require for xsp pages...??


Please help me in run and configuration of xsp pages.

Shweta Singhai

Technical Analyst

Ictect, Inc.

shweta.sing...@ictect.com

The IMPOSSIBLE is often UNTRIED





Re: [C3] How to/where to disable certificate check accessing HTTPS

2010-09-09 Thread Jos Snellings

Hi Andrej,

Could you please provide a little bit more detail on what you want to 
accomplish?

Is it that you need in your sitemap to forward some urls to a secure site?

Cheers,
Jos

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



Re: [Cocoon+OAI]

2010-10-15 Thread Jos Snellings

Hi Marco,

You are looking for scheduled harvesting and storage, whether you save 
the harvest in xml or not.

Cocoon is more about the presentation/transformation of xml.

Maybe this brings you closer :
The Digital Commonwealth http://www.digitalcommonwealth.org/ uses a 
solr based OAI-PMH engine to search digital collections within Massachusetts


The SDX project is based upon cocoon, and gets serious about OAI as well:
http://www.nongnu.org/sdx/docs/html/doc-sdx2/en/index.html


Cheers,
Jos

On 10/15/2010 01:35 PM, Marco BÜCHLER wrote:

 Hi,

I'm currently preparing a proposal in the context of Digital Libraries 
and Open Access. In this context: Does an implementation such as a 
block exist for an OAI web interface? Since Cocoon is an XML based web 
publishing framework, I would expect this but I could not found 
something available in the internet.


Thanks for any help,

Cheers,
Marco

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






Re: [C2.2] Fop Performance Issue with large documents

2010-11-12 Thread Jos Snellings

Hi Matthias,

Do you want to do that on line? Is off-line preparation a possibility?
As an alternative to FOP you could try iText which is completely 
procedural if you want!


Jos

On 11/12/2010 11:16 AM, Matthias Müller wrote:

Hi there,
i ran into massive performance problems using Fop serializing large FO files
(PDFs with 500+ pages).

It takes up to 30 minutes for a single PDF and needs a lot of memory and cpu
power.
If i do the processing locally (no Cocoon but fop.bat), it takes about 2
minutes.
I know that FOP is not performant with large documents, but i only face that
when running inside Cocoon.

Is this a configuration issue?
Are there alternatives to FOP/Cocoon?
How do you process large xml based documents to pdf?
At the moment i still use Fop 0.20.5, what about the performance with Fop 1.0?

Matthias




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


   



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



Re: HTML5 doctype from Cocoon 2.1?

2010-11-14 Thread Jos Snellings

Hi Martin,

Do not know details, but it might help if you use the xsl:output element 
in your transformation.

There is hope that it would not be overridden by the serializer.

xsl:output
method=xml|html|text|name
version=string
encoding=string
omit-xml-declaration=yes|no
standalone=yes|no
doctype-public=string
doctype-system=string
cdata-section-elements=namelist
indent=yes|no
media-type=string/

Cheers,
Jos


On 11/12/2010 05:17 PM, Martin Holmes wrote:

Hi there,

Does anyone know how to configure a serializer for Cocoon 2.1 that
will output an HTML5 document? That means a minimal doctype that looks
like this:

!DOCTYPE html

served as text/html.

Cheers,
Martin


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





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



Re: AW: [C2.2] Fop Performance Issue with large documents

2010-11-14 Thread Jos Snellings

Off-line would be:  with fop.bat, generating static files.

The alternative is more expensive:  write a cocoon serializer based on 
iText.
But is that a guarantee for absolutely big performance? not sure. just a 
good guess.
XSLT transformations may well defeat the purpose of using SAX, as they 
hold a lot of context in memory,


Maybe somebody out there has hands-on experience? Hell. Some good 
advice here?


Cheers,
Jos



On 11/15/2010 08:02 AM, Matthias Müller wrote:

Thanks for replying. We use Cocoon online to serve (10) coworkers. What do you
mean with off-line preparation?
I heard about the good performance of iText. Since we do only xml processing i
need a way to apply xsl:fo stylesheet and afaik there is no xsl fo renderer for
iText.



Matthias



- Ursprüngliche Mail 
Von: Jos Snellingsjos.snelli...@pandora.be
An: users@cocoon.apache.org
Gesendet: Freitag, den 12. November 2010, 14:45:20 Uhr
Betreff: Re: [C2.2] Fop Performance Issue with large documents

Hi Matthias,

Do you want to do that on line? Is off-line preparation a possibility?
As an alternative to FOP you could try iText which is completely
procedural if you want!

Jos

On 11/12/2010 11:16 AM, Matthias Müller wrote:
   

Hi there,
i ran into massive performance problems using Fop serializing large FO files
(PDFs with 500+ pages).

It takes up to 30 minutes for a single PDF and needs a lot of memory and cpu
power.
If i do the processing locally (no Cocoon but fop.bat), it takes about 2
minutes.
I know that FOP is not performant with large documents, but i only face that
when running inside Cocoon.

Is this a configuration issue?
Are there alternatives to FOP/Cocoon?
How do you process large xml based documents to pdf?
At the moment i still use Fop 0.20.5, what about the performance with Fop 1.0?

Matthias




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



 


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



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


   



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



Re: Flash .swf in Cocoon 2.1.11

2010-12-07 Thread Jos Snellings

Hi Peter,

Your page is ok, the element says movie not loaded.  It looks to me 
like your problem is not cocoon related.

I have a similar flash on a site.
It has the parameter play.
Here is a sample:  (classid not right).

OBJECT  
classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0WIDTH=460HEIGHT=345;

PARAM  
NAME=movieVALUE=images/plan-de-pistes-bernex-v3.swf
PARAM  NAME=qualityVALUE=high
PARAM  NAME=bgcolorVALUE=#FF
PARAM  NAME=playvalue=true
EMBED  src=images/plan-de-pistes-bernex-v3.swf  
view-source:http://european-heritage.coe.int/sdx/herein/national_heritage/flash/carte_europe_np.swf?langue=enlien=choose_country.xspquality=highbgcolor=#FFWIDTH=460HEIGHT=345TYPE=application/x-shockwave-flashPLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash;/EMBED/OBJECT

Hope it helps.

Jos



On 12/07/2010 04:22 PM, Peter Sparkes wrote:

Thanks Jasha,

The html page displays correctly, except that the  .swf file is not 
displayed, see http://www.chezmuta.com/flashTest.htm. However, 
http://www.chezmuta.com/images/plan-de-pistes-bernex-v3.swf displays 
the .swf correctly. The browser source page for flashTest.htm appears 
correct.


In my sitemap.xmap file I have

map:match pattern=images/*.swf
map:read mime-type=application/x-shockwave-flash 
src=resources/images/{1}.swf/

/map:match

Regards

Peter



On 7 December 2010 13:49, Peter Sparkes pe...@didm.co.uk 
mailto:pe...@didm.co.uk wrote:


Hi,

I am trying, without success, to display a flash .swf files using
Cocoon 2.1.11

Help please

Peter

What's the problem? Is it the HTML or do you see 404-not found 
responses for certain resources that have anything to do with the 
swf? Providing more information leads more likely to a solution ;)


Jasha Joachimsthal

j.joachimst...@onehippo.com mailto:j.joachimst...@onehippo.com - 
ja...@apache.org mailto:ja...@apache.org


Hippo
Europe   •   Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 
(0)20 522 4466
USA   •   San Francisco  755 Baywood Drive Second Floor  •  Petaluma 
CA 94954   •  +1 877 414 4776 (toll free)
Canada  •   Montréal  5369 Boulevard St-Laurent #430  •  Montréal QC 
H2T 1S5  •  +1 (514) 316 8966
www.onehippo.com http://www.onehippo.com/  • www.onehippo.org 
http://www.onehippo.org/  • i...@onehippo.com 
mailto:i...@onehippo.com








sitemap

2011-01-20 Thread Jos Snellings

Hello,

Cocoon 3:
Is there an expression for the servername in the sitemap?
I am looking for:

map:handle-errors
map:select value={jexl:cocoon.exception.class.name}
map:when contains=NoMatchingPipelineException
map:generate src=error-handling/404.xml /
map:serialize type=xhtml status-code=404 /
/map:when
map:when ends-with=AnonymousAccessException
servlet:redirect-to 
uri=https://{server}/myapplication/secure/loginpage; /

/map:when

Thanks!
Jos

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



Re: sitemap

2011-03-10 Thread Jos Snellings

To reply again (with the some delay ...):
No, the old

{request:serverName}

does not work anymore in 3. The new syntax is:
servlet:redirect-to 
uri=http://{jexl:cocoon.request.serverName}/herein/thesaurus/editor/workspace/


Same with the other request attributes. This is not documented, nor to 
be found in the examples. Hence this mail.

Not too difficult to guess, though!

Any plans to release cocoon 3? Is cocoon-3 like the never ending Bob 
Dylan tour?


Best regards,
Jos


On 01/20/2011 06:22 PM, Laurent Medioni wrote:

Hello,
The old
uri={request:scheme}://{request:serverName}:{request:serverPort}{reques
t:contextPath}/secure/loginpage
Using org.apache.cocoon.components.modules.input.RequestModule does not
work anymore in 3 ?
Laurent

-Original Message-
From: Jos Snellings [mailto:jos.snelli...@pandora.be]
Sent: jeudi 20 janvier 2011 14:07
To: users@cocoon.apache.org
Subject: sitemap

Hello,

Cocoon 3:
Is there an expression for the servername in the sitemap?
I am looking for:

map:handle-errors
map:select value={jexl:cocoon.exception.class.name}
map:when contains=NoMatchingPipelineException
map:generate src=error-handling/404.xml /
map:serialize type=xhtml status-code=404 /
/map:when
map:when ends-with=AnonymousAccessException
servlet:redirect-to
uri=https://{server}/myapplication/secure/loginpage; /
/map:when

Thanks!
Jos

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


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





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



Re: HttpServletRequest from Flowscript

2011-06-12 Thread Jos Snellings

Hi Paul,

C3 or C2.2?
In cocoon-3 you may want to use:

import org.apache.cocoon.servlet.util.HttpContextHelper;

HttpServletRequest request;

public void setup(MapString, Object parameters) {

request = HttpContextHelper.getRequest(parameters);
}
from within a cocoon generator.

Cheers,
Jos

On 06/12/2011 07:01 PM, Paul Joseph wrote:

Hi there,

Does anyone know how one can pass the Cocoon request to a java 
function that needs to use HttpServletRequest?


I passed in the cocoon.request  to the Java function using but inside 
the Java code I am not able to cast the cocoon request to the 
HttpServletRequest.


Any guidance would be appreciated.

Paul

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





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



Re: HttpServletRequest from Flowscript

2011-06-13 Thread Jos Snellings

Well, that seems indeed like a rather complex way to achieve a simple thing.

How about this:
- 2.1 still has a horse called xsp, which is a scripting language 
ensuring nicely balanced tags. Like an xml-ized jsp.
  an xsp page has direct access to request data, and you have access to 
pages. I can send you an example.

- in 3 there is no xsp anymore (it got accused of witchcraft or so ;-) ).

Cheers,
Jos

On 06/13/2011 12:12 PM, Paul Joseph wrote:

Hi Jos,

Thank your for your reply--I am using that old workhourse,  Cocoon 2.1 
(.11)


I find that there it appears to be not that simple at all.  I use 
flowscript and Java and am trying to implement Windows Single SIgn On 
with SPNEGO.


The issue is that it needs HttpServletRequest while all I have in the 
flowscript is cocoon.request which is not the same.


I found the following method on the web.

a) get the application context (avalon)

public void contextualize(Context context) throws ContextException {
objectModel = ContextHelper.getObjectModel(context);
}


b) then with the objectModel, we can do:
final HttpServletRequest httpRequest = (HttpServletRequest) 
objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);



Good...but my problem is simple and after many hours I still don't 
know how to do this:


How does one access the Avalon context in Javascript and then pass it 
to the Java layer?


Now after much reading I find that I should probably write an Action 
and use the sitemap to fire the action.  I gather the sitemap will 
automatically make the objectmodel available to my action code and 
then I can proceed as in step b above.  My only problem is I have 
never written or used an action and so am a bit wary.


rgds
Paul

On 6/13/2011 12:00 AM, Jos Snellings wrote:

Hi Paul,

C3 or C2.2?
In cocoon-3 you may want to use:

import org.apache.cocoon.servlet.util.HttpContextHelper;

HttpServletRequest request;

public void setup(MapString, Object parameters) {

request = HttpContextHelper.getRequest(parameters);
}
from within a cocoon generator.

Cheers,
Jos

On 06/12/2011 07:01 PM, Paul Joseph wrote:

Hi there,

Does anyone know how one can pass the Cocoon request to a java 
function that needs to use HttpServletRequest?


I passed in the cocoon.request  to the Java function using but 
inside the Java code I am not able to cast the cocoon request to the 
HttpServletRequest.


Any guidance would be appreciated.

Paul

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





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




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





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



Re: N00b - But please help - Cocoon syndication/proxy

2011-07-02 Thread Jos Snellings
Could you please be a little bit more specific about the desired 
behaviour of your application?

For instance, on the basis of what do you want to redirect pages?
You can do such things with cocoon, but maybe it is not the best choice. 
Depending on details.


Best,
Jos

On 07/01/2011 07:12 PM, Luke The Man wrote:

I am totally new to cocoon, and while I get the architecture, I am struggling
wading through the various disparate doc elements to figure out what I think
would be a simple task.

I want to use my cocoon instance like a syndication or proxy. I know there
is a syndication example, but it does not have the complete sitemap in it
and it skims over some issues I am not getting. Plus it is based on using
web service calls, and all I want to do is redirect web calls, get the page
and do some parsing on it.

Can anyone help me with this?



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



Re: tomcat 7 64 bit on Windows 2008

2011-12-15 Thread Jos Snellings

Hi Paul,

Did you tell tomcat explicitly where it can find the file?:
# export JAVA_OPTS=\
'-Djava.security.auth.login.config=/root/.java.login.config

Cheers,
Jos


On 12/16/2011 05:06 AM, Paul Joseph wrote:

Hi there,

I have implemented spnego authentication in my cocoon applictaion 
(Tomcat 6, Windows 8 server in 32 bit mode).


But when I try to run it with Tomcat 7, 64 bit on the same server, it 
says that it cannot find the login.conf file.


It is in the same location (directly under Tomcat 7 directory) as I 
would have it if I were using Tomcat 6.


I am not sure this is the right forum to ask this question in, and if 
you know the right forum, please let me know.


The error I get is below, any guidance is much appreciated!

paul

-
java.io.IOException: login.conf (No such file or directory) at
com.sun.security.auth.login.ConfigFile.init(Unknown Source) at 
com.sun.security.auth.login.ConfigFile.init(Unknown Source) at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown 
Source) at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) 
at java.lang.Class.newInstance0(Unknown Source) at 
java.lang.Class.newInstance(Unknown Source) at 
javax.security.auth.login.Configuration$3.run(Unknown Source) at 
java.security.AccessController.doPrivileged(Native Method) at 
javax.security.auth.login.Configuration.getConfiguration(Unknown 
Source) at 
net.sourceforge.spnego.SpnegoFilterConfig.doClientModule(SpnegoFilterConfig.java:176) 
at 
net.sourceforge.spnego.SpnegoFilterConfig.init(SpnegoFilterConfig.java:138) 
at 
net.sourceforge.spnego.SpnegoFilterConfig.getInstance(SpnegoFilterConfig.java:314) 
at 
net.sourceforge.spnego.SpnegoAuthenticator.init(SpnegoAuthenticator.java:206) 
at 
org.apache.cocoon.ojb.samples.bean.SpnegoCocoonAuthenticator.act(SpnegoCocoonAuthenticator.java:97) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:125) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) 
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) 
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) 
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) 
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) 
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) 
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) 
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) 
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) 
at 

classnotfound

2012-01-05 Thread Jos Snellings
Dear cocooners,

When trying to load cocoon-optional, spring complains loudly about not
being able to find class:

org/apache/cocoon/components/serializers/util/XMLSerializer

In effect, this class is not within the cocoon distribution.
To my best knowledge, there is no sub project
cocoon-components

The problematic declaration is:
public class EncodingXMLSerializer extends
org.apache.cocoon.components.serializers.util.XMLSerializer implements
SAXPipelineComponent, Finisher, SAXConsumer, CachingPipelineComponent {

Can anybody shed some light upon this one?


Thank you !
Jos


Re: How/where to create a sitemap in a generated Cocoon 3 web app?

2012-03-01 Thread Jos Snellings

Hi Lars,

The instructions on the site are obscure because they presuppose a good 
deal of Maven knowledge.
Maven helps you to build the project: it puts all the files you need 
together and at first it feels metaphysical

(hey, will you let me control my own build?).

But here's what I do:

ThingToKnow1:  the elements you want to expose, and your sitemap are in 
the block. Your cocoon webapp

is going to mount (my word choice) the blocks on a virtual path.
ThingToKnow2:  You control Mavens behaviour through editing pom.xml. Add 
your Cocoon block as dependency means that you are going to edit the 
pom.xml.


1.   create the webapp from the archetype. The webapp contains close to 
nothing.
  It will contain close to nothing. It should contain the 
canonical structure of a web project:

  pom.xml
  main
  main/resources
  main/webapp
  main/webapp/WEB-INF
  main/webapp/WEB-INF/applicationContext.xml
  main/webapp/WEB-INF/log4j.xml
  main/webapp/WEB-INF/web.xml

Edit pom.xml, you will see the section dependencies. Add the 
dependency for the block you want to add (I said mount,

but I guess that is old fashioned).

dependencies
dependency
groupIdorg.tiaterra/groupId
artifactIdmyCocoonBlock/artifactId
version1.0.0-SNAPSHOT/version
/dependency
/dependencies

2.  create your block from the archetype

 This will create a structure like:
src
src/test
src/test/resources
src/test/java
src/main
src/main/resources
src/main/resources/COB-INF
src/main/resources/COB-INF/javascript
src/main/resources/COB-INF/xslt
src/main/resources/COB-INF/images
src/main/resources/COB-INF/style
src/main/resources/COB-INF/style/images
src/main/resources/COB-INF/static-content
src/main/resources/META-INF
src/main/resources/META-INF/cocoon
src/main/resources/META-INF/cocoon/spring
src/main/java
src/main/java/org
src/main/java/org/tanteterra

Your site map is at:

src/main/resources/COB-INF/sitemap.xmap

And true, the documentation on the site does not make it easy enough to step
up the threshold and upgrade.
[@group: shouldn't we do something about that. Cocoon is losing its user 
base,
it will end up getting adopted only by a few old people out there. It is 
gaining momentum on the planet Zork but that's not

going to help us on Earth, is it?]

I hope this helps you on the way. It would make me very happy to know 
that I am not one of the sole developers
on this planet who chose cocoon 3 as a development platform, for the few 
times in your life that you are in the
position to make this choice for your customer! I chose for cocoon 3 
because I liked the new architecture.
[@group: this can be the start for a tutorial for newbies, someone 
interested? I feel that the maven integration and
the spring part deserve better explanation, they are way too arcane for 
starters. A tutorial could explain how to get things

done without first studying two other frameworks.]

Kind regards,
Jos Snellings


On 03/01/2012 11:59 PM, Lars Huttar wrote:

Hello,

We've been Cocoon 2.1.* users for years. We're now trying to shift to 
the Cocoon 3 way of doing things.

I barely understand Maven, but I'm willing to learn.

I've installed Cocoon 3, and can run a sample.

But now I'm having trouble figuring out how to build my own hello 
world web application.


What I did so far:

|   svn checkout 
http:||//svn.apache.org/repos/asf/cocoon/cocoon3/trunk c3|

 cd c3
|   mvn clean install
   cd cocoon-databases-sample
   mvn jetty:run
|

I can then access the running databases sample at
http://localhost:/
in the browser.

I've generated the four Maven 2 archetypes as instructed at 
http://cocoon.apache.org/3.0/download.html

(sample, block, webapp, parent).
I don't understand, though, what each one is for.

For archetype-block, the instruction says Create an empty Cocoon 3 
block in order to create your own Cocoon 3 web application.
But once I've done that, what do I do in the generated block in order 
to create a web application?


For archetype-webapp, it says Create an empty Java web application 
project. After that add your Cocoon block as dependency. I guess 
Cocoon block refers to the previous thing I generated. How do I add it 
as a dependency? I guess I should edit cocoon-archetype-webapp/pom.xml 
and add this before /project:

dependencies
dependency
groupIdorg.apache.cocoon.archetype-block/groupId
artifactIdcocoon-archetype-block/artifactId
/dependency
/dependencies

For archetype-parent, the instruction says Create a parent module for 
your Cocoon project. Is a project the same as a web application? Does 
this mean I should edit the contents of parent in 
archetype-webapp/pom.xml to point correctly to archetype-parent? (The 
parent element is present already, but its groupId, artifactId, and 
relativePath are a bit off from what would match the parent archetype 
generated by the instructions.)



**The main thing I want to know, though,** is where do I start 
building

Re: How/where to create a sitemap in a generated Cocoon 3 web app?

2012-03-02 Thread Jos Snellings
Well, that's two of us. In fact, three, as Francesco would be willing to 
contribute as well.
The mail is a good starting point. And then I notice a **strong** 
suggestion to release. Put that together

and we can get this thing rolling again!
Let's rock!

Have a nice weekend,
Jos

On 03/02/2012 04:30 PM, Lars Huttar wrote:

Jos, thanks for these helpful instructions!

I will create a sitemap at src/main/resources/COB-INF/sitemap.xmap and 
see how far that gets me.


I agree, it would be very helpful to have a tutorial for newbies! I'll 
be happy to make a contribution.


Lars


On 3/2/2012 12:47 AM, Jos Snellings wrote:

Hi Lars,

The instructions on the site are obscure because they presuppose a 
good deal of Maven knowledge.
Maven helps you to build the project: it puts all the files you need 
together and at first it feels metaphysical

(hey, will you let me control my own build?).

But here's what I do:

ThingToKnow1:  the elements you want to expose, and your sitemap are 
in the block. Your cocoon webapp

is going to mount (my word choice) the blocks on a virtual path.
ThingToKnow2:  You control Mavens behaviour through editing pom.xml. 
Add your Cocoon block as dependency means that you are going to edit 
the pom.xml.


1.   create the webapp from the archetype. The webapp contains close 
to nothing.
  It will contain close to nothing. It should contain the 
canonical structure of a web project:

  pom.xml
  main
  main/resources
  main/webapp
  main/webapp/WEB-INF
  main/webapp/WEB-INF/applicationContext.xml
  main/webapp/WEB-INF/log4j.xml
  main/webapp/WEB-INF/web.xml

Edit pom.xml, you will see the section dependencies. Add the 
dependency for the block you want to add (I said mount,

but I guess that is old fashioned).

dependencies
dependency
groupIdorg.tiaterra/groupId
artifactIdmyCocoonBlock/artifactId
version1.0.0-SNAPSHOT/version
/dependency
/dependencies

2.  create your block from the archetype

 This will create a structure like:
src
src/test
src/test/resources
src/test/java
src/main
src/main/resources
src/main/resources/COB-INF
src/main/resources/COB-INF/javascript
src/main/resources/COB-INF/xslt
src/main/resources/COB-INF/images
src/main/resources/COB-INF/style
src/main/resources/COB-INF/style/images
src/main/resources/COB-INF/static-content
src/main/resources/META-INF
src/main/resources/META-INF/cocoon
src/main/resources/META-INF/cocoon/spring
src/main/java
src/main/java/org
src/main/java/org/tanteterra

Your site map is at:

src/main/resources/COB-INF/sitemap.xmap

And true, the documentation on the site does not make it easy enough 
to step

up the threshold and upgrade.
[@group: shouldn't we do something about that. Cocoon is losing its 
user base,
it will end up getting adopted only by a few old people out there. It 
is gaining momentum on the planet Zork but that's not

going to help us on Earth, is it?]

I hope this helps you on the way. It would make me very happy to know 
that I am not one of the sole developers
on this planet who chose cocoon 3 as a development platform, for the 
few times in your life that you are in the
position to make this choice for your customer! I chose for cocoon 3 
because I liked the new architecture.
[@group: this can be the start for a tutorial for newbies, someone 
interested? I feel that the maven integration and
the spring part deserve better explanation, they are way too arcane 
for starters. A tutorial could explain how to get things

done without first studying two other frameworks.]

Kind regards,
Jos Snellings






Re: Cocoon 2.2 and OSGI

2012-03-02 Thread Jos Snellings

Hi Fawzib,

There are certainly traces of such attempts, for instance:

artifactIdcocoon-xml/artifactId
version2.0.3-SNAPSHOT/version
packagingbundle/packaging

Anyone knows more?

Jos



On 03/02/2012 04:20 PM, Fawzib Rojas wrote:
I have been working in Glassfish and OSGI and was wondering, did 
Cocoon 2.2 was ever made into an OSGI bundle? I googled some info 
about it and all I saw was some messages from 2005-2008 talking about 
it and a wiki page about experimenting with it, last edited on 2009.


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





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



pipeline component

2012-03-08 Thread Jos Snellings

Hi !

Question:
*  a web form controls the generation of a report
* the report comes as a .zip  download

What sitemap component should be created for this report generator?
(in fact it should be a single component, like map:read)
- set headers
- write zip output to response.getOutputStream

Thanks,
Jos

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



Re: pipeline component

2012-03-08 Thread Jos Snellings

Hi Francesco!

I am running 3!

Jos

On 03/08/2012 12:20 PM, Francesco Chicchiriccò wrote:

On 08/03/2012 11:44, Jos Snellings wrote:

Hi !

Hi Jos: first of all, which version are you running?


Question:
*  a web form controls the generation of a report
* the report comes as a .zip  download

What sitemap component should be created for this report generator?
(in fact it should be a single component, like map:read)
- set headers
- write zip output to response.getOutputStream



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



Re: pipeline component

2012-03-08 Thread Jos Snellings

Thanks Robby  Francesco!

That been said, the use case is a bit special.
In my case the sitemap would have gone involved.
I did not split it up and here's what I did:

public class mycomponent implements Starter, Finisher
{

ZipOutputStream zip_out = new ZipOutputStream(outputStream);
compose and add requested entries
zip_out.close();
}

and just added setOutputStream() and getContentType()

The question is often where you want to put the complexity.
Granted, defeats a bit the purpose of a pipeline, but it works ;-)

Jos

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



Re: parent of parent artifact?

2012-03-10 Thread Jos Snellings


Thanks for sharing this, Thorsten.
How do your poms then all fit together? Via a parent pom?
I have to draw up an architecture for a similar project: XML content is 
addressable via web services.

(not necessarily cocoon).

Cheers,
Jos

On 03/10/2012 01:27 AM, Thorsten Scherler wrote:

major dep to the gui block which then has the deps



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



Re: parent of parent artifact?

2012-03-10 Thread Jos Snellings

And thanks, Robby!
I was considering a couple of alternatives.
This makes it clearer.

Jos



On 03/10/2012 06:20 PM, Robby Pelssers wrote:

Hi Jos,

Just speaking for myself here but the parent pom is mostly a pom that you just 
reference because it contains a list of dependencies including the version 
numbers. That way you just have to include any dependencies you need in your 
pom's referencing this parent pom and you can leave out the versions.  This 
ensures that all projects use the same versions of jars.

You can also declare e.g. all known modules for this project like.

 modules
 module../productinformationwebapp/module
 module../productpreview/module
 module../producttransformer/module
 module../shared/module
 /modules

So if you do a mvn install it will trigger a reactor build in this case.

It will typically also contain any repositories used (e.g. enterprise maven 
repository(

 repositories
 repository
 idnxp-releases/id
 
urlhttp://ecm.evelopers.com:8081/nexus/content/groups/public/url
 snapshotsenabledfalse/enabled/snapshots
 releasesenabledtrue/enabled/releases
 /repository
 repository
 idnxp-snapshots/id
 
urlhttp://ecm.evelopers.com:8081/nexus/content/groups/public-snapshots/url
 snapshotsenabledtrue/enabled/snapshots
 releasesenabledfalse/enabled/releases
 /repository
 /repositories
 pluginRepositories
 pluginRepository
 idmycompany-releases/id
 url/url
 snapshotsenabledfalse/enabled/snapshots
 releasesenabledtrue/enabled/releases
 /pluginRepository
 pluginRepository
 idmycompany-snapshots/id
 url/url
 snapshotsenabledtrue/enabled/snapshots
 releasesenabledfalse/enabled/releases
 /pluginRepository
 /pluginRepositories

 distributionManagement
 repository
 idmycompany-releases/id
 url./url
 /repository
 snapshotRepository
 uniqueVersionfalse/uniqueVersion
 idmycompany-snapshots/id
 url./url
 /snapshotRepository
 /distributionManagement

Robby

-Original Message-
From: Jos Snellings [mailto:jos.snelli...@pandora.be]
Sent: Saturday, March 10, 2012 3:13 PM
To: users@cocoon.apache.org
Subject: Re: parent of parent artifact?


Thanks for sharing this, Thorsten.
How do your poms then all fit together? Via a parent pom?
I have to draw up an architecture for a similar project: XML content is
addressable via web services.
(not necessarily cocoon).

Cheers,
Jos

On 03/10/2012 01:27 AM, Thorsten Scherler wrote:

major dep to the gui block which then has the deps


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


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





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



log levels

2012-05-02 Thread Jos Snellings
Dear group,

C3:
Departing from the log4j.xml from the sample configuration I try to get rid
of the DEBUG-level lines
from the sitemap and pipelines.
However, no matter what level I specify for the ROOT logger (logging to
consoleappender), these DEBUG messages
keep appearing. I see no other log4j.xml on the classpath. Am I overlooking
something?

Kind regards,
Jos

-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: log levels

2012-05-02 Thread Jos Snellings
OK, that is good news.
Thank you, Thorsten.
Jos


On Wed, May 2, 2012 at 3:27 PM, Thorsten Scherler scher...@gmail.comwrote:

 On 05/02/2012 03:11 PM, Jos Snellings wrote:

 Dear group,

 C3:
 Departing from the log4j.xml from the sample configuration I try to get
 rid of the DEBUG-level lines
 from the sitemap and pipelines.
 However, no matter what level I specify for the ROOT logger (logging to
 consoleappender), these DEBUG messages
 keep appearing. I see no other log4j.xml on the classpath. Am I
 overlooking something?


 If you talk about current beta log4j has been droped. Create a
 src/main/resources/logback.xml (when target is war deploy) or
 cl-config/WEB-INF/classes/**logback.xml (when you use jetty:run) in your
 project and c3 will use that.

 HTH

 salu2

 --
 Thorsten Scherlerscherler.at.gmail.com**
 codeBusters S.L. - web based systems
 consulting, training and solutions

 http://www.codebusters.es/


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




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


fop fonts

2012-05-07 Thread Jos Snellings
Dear group,

In C3,
I need to load extra fonts for FOP. The default set cannot display cyrillic
characters,
and greek characters with diacritics.
Where would one put them best?
What is best to configure the fopFactory? Where should the configuration
file be?

Just before I experiment a bit to find it out, probably somebody out there
knows the answer.

Thank you !
Jos

-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


mount named blocks inconvenience

2012-05-10 Thread Jos Snellings
Dear cocooners,

Problem:
1. In the definition of a named block, for:
servlet:context mount-path=/foo context-path=blockcontext:/foo//

This tells the cocoon servlet that a block foo is mounted on foo in the
webapp.

2. sitemap.xmap
  An empty matcher like in the cocoon sample:
 map:match pattern=
map:read src=welcome.html mime-type=text/html/
  /map:match

3. call
localhost/mywebapp/foo

   or, the root of the block. (it is configured correctly, all the rest
works).

EVENT:  exception:

For named blocks
java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at
java.lang.String.charAt(String.java:687) at
org.apache.cocoon.sitemap.node.MatchNode.invoke(MatchNode.java:89)

Without having it investigated in extenso, it seems that when blocks are
named, so not mounted as 'root block', that there is a problem with
excerpt
String testValue = resolvedValue == null
? null : resolvedValue.toString();
if (testValue == null) {
testValue = invocation.getRequestURI();
if (testValue.charAt(0) == '/') {
testValue = testValue.substring(1);
}
}
/excerpt
The value is null.

By the way,
localhost/mywebapp/foo/
nicely produces the expected welcome page.

Anyone knows this problem?


Kind regards,
Jos

-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: mount named blocks inconvenience

2012-05-11 Thread Jos Snellings
O yes, Francesco, that is in every way a good workaround.
Thanks,
Jos

On Fri, May 11, 2012 at 12:43 PM, Francesco Chicchiriccò 
ilgro...@apache.org wrote:

  On 10/05/2012 13:05, Jos Snellings wrote:

 Dear cocooners,

 Problem:
 1. In the definition of a named block, for:
 servlet:context mount-path=/foo context-path=blockcontext:/foo//

 This tells the cocoon servlet that a block foo is mounted on foo in
 the webapp.

 2. sitemap.xmap
   An empty matcher like in the cocoon sample:
  map:match pattern=
 map:read src=welcome.html mime-type=text/html/
   /map:match

 3. call
 localhost/mywebapp/foo

or, the root of the block. (it is configured correctly, all the rest
 works).

 EVENT:  exception:

 For named blocks
  java.lang.StringIndexOutOfBoundsException: String index out of range: 0
 at java.lang.String.charAt(String.java:687) at
 org.apache.cocoon.sitemap.node.MatchNode.invoke(MatchNode.java:89)

 Without having it investigated in extenso, it seems that when blocks are
 named, so not mounted as 'root block', that there is a problem with
 excerpt
 String testValue = resolvedValue == null
 ? null : resolvedValue.toString();
 if (testValue == null) {
 testValue = invocation.getRequestURI();
 if (testValue.charAt(0) == '/') {
 testValue = testValue.substring(1);
 }
 }
 /excerpt
 The value is null.

 By the way,
 localhost/mywebapp/foo/
 nicely produces the expected welcome page.

 Anyone knows this problem?


 I've seen this since my first experiments with Cocoon 2.0 (and I am sure
 that if you search archives you would also get some better reply than
 this...): basically,

 http://localhost/mywebapp/foo

 and

 http://localhost/mywebapp/foo/

 are two different HTTP resources; the root of matching for a given block
 (i.e. map:match pattern=) will always get not more than foo/.

 If you want to match http://localhost/mywebapp/foo, I think you'll have
 to mount something at root (say a 'bar' block)

   servlet:context mount-path= context-path=blockcontext:/bar/

 then inside this bar block have

 map:match pattern=foo
 ...


 I hope all this is formally correct: if not, it's the way I've been
 following so far ;-)
 Regards.

 --
 Francesco Chicchiriccò

 Apache Cocoon PMC and Apache Syncope PPMC 
 Memberhttp://people.apache.org/~ilgrosso/




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: Cocoon 2.1 web application base path

2012-05-15 Thread Jos Snellings
Hi !

What are you trying to achieve?

Jos

On Wed, May 16, 2012 at 6:52 AM, Bob Harrod rjhar...@gmail.com wrote:

 I'm quite new to cocoon, and supporting an older version (2.1).  Does
 anyone know how I can gain access the web application base path inside of a
 transform?  Of course, it can be passed by the sitemap...  Any help would
 be appreciated!

 Thanks!




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


CocoonJAXRSServlet

2012-05-18 Thread Jos Snellings
Dear all,

Cocoon-3 ordinary pipeline components offer a flexible way to organise
REST-full calls between services.
(REST, after all is a principle, not a framework).
However, curiosity drove me into setting up a small example of a JAX-RS
webservice.
1. with mvn jetty:run : works perfectly
2. as a block in a standalone war context, deployed to tomcat :
  java.lang.NoClassDefFoundError:
com/sun/jersey/spi/container/servlet/ServletContainer
This is configured in cocoon-rest. Does it need the jersey container or can
we get rid of it?

Kind regards,
Jos


-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Sitemap: path matching

2012-05-24 Thread Jos Snellings
Hi all,

I am looking for a way to pass a variable number of sitemap parameters to a
sitemap component:
I explain the use case:

** stands for non-greedy multiple segment matcher, no?

map:match pattern=retrievebypath/**/{name}.{extension}
  map:generate type=retrieve
map:parameter ?
  /map:generate
/map:match

Of course you could {1}, {2}, {3}  but that is a clutch.
Is there an elegant way?

Kind regards,
Jos


-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: Sitemap: path matching

2012-05-24 Thread Jos Snellings
Hi Robby,

Here's an example:

   a
href=matchbypath/virtualrootfolder/themes/conservation/index.html
conservation /a

   = this is to be a hit for a matcher, and what I would like
to pass to the generator:

   matchbypath/{path}/{name}.{extension}

   Of course, the pipeline matcher cannot know how many segments
there will be.

Cheers,
Jos



On Thu, May 24, 2012 at 4:38 PM, Robby Pelssers robby.pelss...@nxp.comwrote:

 Can you give a few possible examples of the pattern that you’re trying to
 match?

 ** **

 Ps.  Maybe a bit nasty as solution but let’s say you want to handle
 multiple productId’s

 ** **

 ** **

 Pattern=”generateProduct/*”

 ** **

 Example

 ** **

 generateProduct/[P1, P2, P3]

 ** **

 You just pass ‘[P1,P2,P3]’ to your generator as a single argument and let
 the generator extract the ids.

 ** **

 Robby

 ** **

 *From:* Jos Snellings [mailto:jos.snelli...@upperware.biz]
 *Sent:* Thursday, May 24, 2012 4:31 PM
 *To:* cocoon-us...@apache.org
 *Subject:* Sitemap: path matching

 ** **

 Hi all,

 I am looking for a way to pass a variable number of sitemap parameters to
 a sitemap component:
 I explain the use case:

 ** stands for non-greedy multiple segment matcher, no?

 map:match pattern=retrievebypath/**/{name}.{extension}
   map:generate type=retrieve
 map:parameter ?
   /map:generate
 /map:match

 Of course you could {1}, {2}, {3}  but that is a clutch.
 Is there an elegant way?

 Kind regards,
 Jos


 --
 The doctrine of human equality reposes on this: that there is no man
 really clever who has not found that he is stupid.
 -- Gilbert K. Chesterson

 




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: Sitemap: path matching

2012-05-24 Thread Jos Snellings
Yep, I will give that a try !

Thanks, Robby,
Jos


Re: back button results in a blank

2012-08-22 Thread Jos Snellings
Hi Paul,

The browser's back button problem is not a specific cocoon one.
I believe that it could have different causes.
It is even browser specific, I believe. The back button is just supposed to
show the previous viewed resource.
I usually stick to 'restful design principles'. This may help to alleviate
back button issues.
As a principle, I never make webapps block the back button.
I know this sounds a bit vague, but it's for the moment my best shot.
Anyone else?

Kind regards,
Jos

On Tue, Aug 21, 2012 at 8:47 PM, Paul Joseph pjos...@gmail.com wrote:

 Hi there,

 I notice that many times when I click the browser's back button, when I
 expect to see the form previously that was displayed, instead I get a blank
 page and have to click the browser's refresh button to retrieve what was
 there.

 This is IE8 in particular.

 Is there any simple way to preserve what was there before so that on
 clicking the back button it displays directly instead of having to click
 refresh on a blank page?

 paul

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




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: more encoding problems

2012-09-20 Thread Jos Snellings
Hi Mika,

Your page declares utf-8 as a character set, but the text you send is not
in utf-8. Hence the question mark
characters.
Question 1: is it the same database that is accessed? (or rather, a copy)
Question 2: what is the database url?

Cheers,
Jos

On Thu, Sep 20, 2012 at 9:22 AM, m...@digikartta.net wrote:


 Hi,
 C2.11, I moved my app from one server to another, which resulted some
 pages to broke that is scands won't encode properly.
 I have this in my sitemap:

 map:match pattern=linkki/html/*
 map:generate src=cocoon:/linkki/{1} type=text
 /map:generate
 !--map:transform type=xslt src=linkki.xslt/--
 map:serialize type=text
 /map:serialize
 /map:match

 map:match pattern=linkki/*
 map:read type=databasereader src=0 mime-type=text/plain
 !-- option sitemap parameters --
 map:parameter name=table value=arvot/
 map:parameter name=image value=arvo_varchar/
 map:parameter name=key value=fake/
 map:parameter name=where value=id={1}/
 /map:read
 /map:match

 You can try this out:
 Old server
 http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841works
 http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841works
 New server
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059works
 http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059doesn't
  work !!

 Any thoughts?
 I have tried a lot of things without success.

 - mika -

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




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: more encoding problems

2012-09-20 Thread Jos Snellings
What does your web.xml look like?

On Thu, Sep 20, 2012 at 2:51 PM, m...@digikartta.net wrote:


 Also XML-element tags in xsp-files have question marks instead of scands.
 I also verified that the database is delivering the right stuff. The same
 database used in this (http://88.148.163.59/cocoon/**
 palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059),
 works with local copy of cocoon.

 Updated data, just checked this out. Even this one will fail.
 sitemap:
 map:match pattern=koe
 map:generate type=serverpages src=koe.xsp
 /map:generate
 map:serialize type=xml/
 /map:match

 koe.xsp:
 ?xml version=1.0 encoding=utf-8?
 xsp:page language=java
   xmlns:xsp=http://apache.org/**xsp http://apache.org/xsp
 page
 Äiti/Äiti
 /page
 /xsp:page

 Works locally.

 - mika -


 On Thu, 20 Sep 2012 15:14:35 +0300, m...@digikartta.net wrote:

 Hi Jos,
 yep, that's right, the text seems not to be utf-8.
 Same problem occurs in another page where the text not working comes
 from flowscript.
 1) No it's not, it's a copy. But you can verify everything is ok in
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059(database
  reader).
 Seems to me, that the text falls apart in the text generator.
 2) the url is in private network

 - mika -

 On Thu, 20 Sep 2012 11:42:32 +0200, Jos Snellings
 jos.snelli...@upperware.biz wrote:

 Hi Mika,

 Your page declares utf-8 as a character set, but the text you send is
 not in utf-8. Hence the question mark
 characters.
 Question 1: is it the same database that is accessed? (or rather, a
 copy)
 Question 2: what is the database url?

 Cheers,
 Jos

 On Thu, Sep 20, 2012 at 9:22 AM,  wrote:

  Hi,
  C2.11, I moved my app from one server to another, which resulted
 some pages to broke that is scands won't encode properly.
  I have this in my sitemap:

  You can try this out:
  Old server
  
 http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[2]
  works
  
 http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[3]
  works
  New server
  
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[4]
  works
  
 http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[5]
  doesn't
 work !!

  Any thoughts?
  I have tried a lot of things without success.

  - mika -



 --**--**
 -
  To unsubscribe, e-mail: 
 users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[6]
  For additional commands, e-mail: users-h...@cocoon.apache.org [7]

 --
 The doctrine of human equality reposes on this: that there is no man
 really clever who has not found that he is stupid.
 -- Gilbert K. Chesterson



 Links:
 --
 [1] mailto:m...@digikartta.net
 [2] 
 http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841
 [3] 
 http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841
 [4] 
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059
 [5] 
 http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059
 [6] 
 mailto:users-unsubscribe@**cocoon.apache.orgusers-unsubscr...@cocoon.apache.org
 [7] mailto:users-help@cocoon.**apache.org users-h...@cocoon.apache.org



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



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




-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


Re: more encoding problems

2012-09-20 Thread Jos Snellings
Just wanted to have a look.
I compared to with what I had, and it is the same. No luck.

On Thu, Sep 20, 2012 at 3:18 PM, m...@digikartta.net wrote:


 if you are referring to this part, it's like this:
 init-param
   param-namecontainer-**encoding/param-name
   param-valueISO-8859-1/**param-value
 /init-param

 !--
   Set form encoding. This will be the character set used to decode
 request
   parameters. If not set the ISO-8859-1 encoding will be assumed.
 --
 init-param
   param-nameform-encoding/**param-name
   param-valueUTF-8/param-**value
 /init-param

 Or some else setting you are interested in?
 This works home and this works in another remote server. I also copied the
 java from working server to this, but nada..
 Tomcat is different, server.xml clone.



 On Thu, 20 Sep 2012 15:05:33 +0200, Jos Snellings 
 jos.snelli...@upperware.biz wrote:

 What does your web.xml look like?

 On Thu, Sep 20, 2012 at 2:51 PM,  wrote:


  Also XML-element tags in xsp-files have question marks instead of
 scands.
  I also verified that the database is delivering the right stuff. The
 same database used in this
 (http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[2]),
  works

 with local copy of cocoon.

  Updated data, just checked this out. Even this one will fail.
  sitemap:

  koe.xsp:


  Works locally.

  - mika -

  On Thu, 20 Sep 2012 15:14:35 +0300,  wrote:

   Hi Jos,
  yep, that's right, the text seems not to be utf-8.
  Same problem occurs in another page where the text not working comes
  from flowscript.
  1) No it's not, it's a copy. But you can verify everything is ok in
  
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[5]
  (database

 reader).
  Seems to me, that the text falls apart in the text generator.
  2) the url is in private network

  - mika -

  On Thu, 20 Sep 2012 11:42:32 +0200, Jos Snellings
   wrote:
   Hi Mika,

  Your page declares utf-8 as a character set, but the text you send
 is
  not in utf-8. Hence the question mark
  characters.
  Question 1: is it the same database that is accessed? (or rather, a
  copy)
  Question 2: what is the database url?

  Cheers,
  Jos

  On Thu, Sep 20, 2012 at 9:22 AM,  wrote:

   Hi,
   C2.11, I moved my app from one server to another, which resulted
  some pages to broke that is scands won't encode properly.
   I have this in my sitemap:

   You can try this out:
   Old server
   
 http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[7]
  [2] works
   
 http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[8]
  [3]
 works
   New server
   
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[9]
  [4] works
   
 http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[10]
  [5]

 doesn't
  work !!

   Any thoughts?
   I have tried a lot of things without success.

   - mika -


 --**--**-
   To unsubscribe, e-mail: 
 users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[11]
 [6]
   For additional commands, e-mail: users-h...@cocoon.apache.org [12]

 [7]

  --
  The doctrine of human equality reposes on this: that there is no man
  really clever who has not found that he is stupid.
  -- Gilbert K. Chesterson

  Links:
  --
  [1] mailto:m...@digikartta.net [13]
  [2] 
 http://77.240.23.91/cocoon/**palaute_app/linkki/841http://77.240.23.91/cocoon/palaute_app/linkki/841[14]
  [3] 
 http://77.240.23.91/cocoon/**palaute_app/linkki/html/841http://77.240.23.91/cocoon/palaute_app/linkki/html/841[15]
  [4] 
 http://88.148.163.59/cocoon/**palaute_app/linkki/1059http://88.148.163.59/cocoon/palaute_app/linkki/1059[16]
  [5] 
 http://88.148.163.59/cocoon/**palaute_app/linkki/html/1059http://88.148.163.59/cocoon/palaute_app/linkki/html/1059[17]
  [6] 
 mailto:users-unsubscribe@**cocoon.apache.orgusers-unsubscr...@cocoon.apache.org[18]
  [7] mailto:users-help@cocoon.**apache.org users-h...@cocoon.apache.org[19]


 --**--**-
  To unsubscribe, e-mail: 
 users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[20]
  For additional commands, e-mail: users-h...@cocoon.apache.org [21]


 --**--**-
  To unsubscribe, e-mail: 
 users-unsubscribe@cocoon.**apache.orgusers-unsubscr...@cocoon.apache.org[22]
  For additional commands, e-mail: users-h...@cocoon.apache.org [23]


 --
 The doctrine of human equality reposes on this: that there is no man
 really clever who has not found that he is stupid.
 -- Gilbert K. Chesterson



 Links:
 --
 [1

Re: beginner q: possible to set extension .xsl as type='xslt' by default?

2012-10-16 Thread Jos Snellings
Dear Tom,

Can you send your sitemap.xmap over?
For cocoon, the default transformation is an xslt.

If you are just starting with a migration, you may want to consider using
cocoon 3, which is at the moment in beta,
but soon the production version will be ready (@others: isn't it ? :-)

Kind regards,
Jos


On Tue, Oct 16, 2012 at 3:55 PM, whatnext tom_gra...@yahoo.co.uk wrote:


 Dear learned cocoon users,

 Very sorry for the ignorance of this question. Our company has recently
 decided it might be time to move away from AxKit (!) and we are looking at
 the alternatives. Cocoon is an obvious choice. However, I know absolutely
 nothing about it other than a broad idea of what it does.

 I have been trying to get Cocoon to serve some of our pages to see whats
 involved.

 I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
 and sure enough could display the welcome page.

 Next up I tried to display one of our web pages by copying over an .xml and
 related .xsl stylesheets and modifying the sitemap.xmap file.

 So then it falls over saying:

 Unable to get transformer handler for file:///path/example.xsl ...

 If I go into sitemap.xmap and add type=xslt to the map:transform src =
 '...' line then this error seems resolved but then it falls over with

 Unable to get transformer handler for file:///path/another.xsl

 where another.xsl is referred to by example.xsl. What can be done in this
 case? Is there a way of telling cocoon that it needs to use the xslt
 transformer anywhere it sees .xsl... ? Or am i approaching this in all the
 wrong way etc.?

 Many apologies for the elementary nature of this question - I freely admit
 I
 have no idea what I am doing!

 Any help appreciated...







 --
 View this message in context:
 http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
 Sent from the Cocoon - Users mailing list archive at Nabble.com.


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




-- 
All generous minds have a horror of what are commonly called Facts. They
are the brute beasts of the intellectual domain.
-- Thomas Hobbes
 http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html


  1   2   >