Re: Want to join in this group..

2011-10-19 Thread Thomas Markus

Hi,

We've also that problem and this is really annoying. It looks like a JDK 
Bug. I switched to 1.6.0_24 which works fine. All later releases produce 
this behaviour.

Updated to 1.7.0_01 now which works.

rgards
Thomas


Am 19.10.2011 08:21, schrieb Jagadeesh Kumar Bhavanasi:

Hi, This is Jagadeesh and am a developer of Cocoon.

We are still using cocoon2.1.10 with latest JDK 1.6

we have migrated JDK from 1.6.0_07 to 1.6.0_26. Now we are facing a 
problem with 1.6.0_26. with JDK 07, entire system was working perfectly.


Now with latest JDK(26), all the application is working fine for some 
time(for 1 /2 days) then the problem occurs. Problem is where ever i 
have used the jx:foreach, there it is iterating only for one time, 
then loop is getting ended. When i debugged, i observed that the size 
of the arraylist, that i am sending to cocoon contains more than one 
element and even the size in the .jx file is also more than one. but 
the loop is not getting iterated more than once.


We are suspecting the  problem is in ehcache, is my assumption correct?
Is there any solution for this problem?

/Regds
Jagadeesh B

/




Re: C2.2: Accessing static method on Java object with Flowscript

2011-08-14 Thread Thomas Markus

Hi,

or create an instance without spring:

var bean = new com.foo.bar.Useful();
bean.someMethod(arg1, arg2);

regards
Thomas

Am 12.08.2011 15:34, schrieb Andre Juffer:
To answer my own question. I created a new entry in the application's 
Spring configuration file,


bean id=com.foo.bar.Useful class=com.foo.bar.Useful /

In script, I used

var useful = cocoon.getComponent(com.foo.bar.Useful);
useful.someMethod(arg1, arg2);

This does not require any modification to the source code of the class 
(that is, the private constructor remains private). It is bit 
cheating, but alas, such is life.


On 08/12/2011 02:53 PM, Andre Juffer wrote:

Hi,

I am dealing with the following. An extremely useful Java class provides
a static method for completing a particular task, like

class Useful {
private Useful() {}

public static void someMethod(String arg1, String arg2)
{
...
}

}

In flow, I do something like

var arg1 = test1;
var arg2 = test2;
Packages.com.foo.bar.Useful.someMethod(arg1, arg2);

The error I get is

Java constructor for com.foo.bar.Useful.someMethod with arguments
java.lang.String,java.lang.String not found.

My question is now. How can I call a static method on a Java class, if
at all, in Flowscript. One solution is to make the constructor of the
class public (certainly not my preference).

Thanks,







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



Re: C2.2: Accessing static method on Java object with Flowscript

2011-08-14 Thread Thomas Markus

Hi,

i missed the private

i tried direct access and it works fine:

var U = Packages.com.foo bar.UseFul;
U.someMethod('text1', 'stringb');

Packages.com.foo.bar.UseFul.someMethod('text1', 'stringb');


public class UseFul {

private UseFul() {}

public static void someMethod(String a, String b) {
System.out.println(a= + a +   b= + b);
}

}


I'm using C2.2

regards
Thomas


Am 14.08.2011 20:20, schrieb Andre Juffer:

On 08/14/2011 03:04 PM, Thomas Markus wrote:

Hi,

or create an instance without spring:

var bean = new com.foo.bar.Useful();
bean.someMethod(arg1, arg2);


Actually, this would (should) not work as the constructor of Useful is 
private. It may be that this would not matter in flow, that is, one 
can call private constructors (did not try). In Spring this is possible. 


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



Re: Streaming buffered image using Cocoon

2011-05-24 Thread Thomas Markus

hi,

it remains pretty simple :)

regards
Thomas

map:match pattern=time.jpg
map:call function=intercept /
/map:match
map:match pattern=generate.image
map:read type=timeimg/
/map:match


function intercept() {
var backgroundVariable = '#44ffFF';
var text = String(new Date());
cocoon.sendPage(generate.image, {
background : backgroundVariable,
text : text,
size : 55.3
});
}

public class TestImageReader extends AbstractReader {

public String getMimeType() {
return image/png;
}

private Object get(String name, Scriptable s) {
Object o = s.get(name, s);
while (o instanceof Wrapper) {
o = ((Wrapper) o).unwrap();
}
return o;
}

@Override
public void generate() throws IOException, SAXException, 
ProcessingException {

Object contextObject = FlowHelper.getContextObject(objectModel);
Object text = null;
Object background = null;
float fontsize = 80.f;

if (contextObject instanceof Scriptable) {
Scriptable s = (Scriptable) contextObject;
background = get(background, s);
text = get(text, s);
Object size = get(size, s);
if (size instanceof Number) {
fontsize = ((Number) size).floatValue();
}
}

if (text == null)
text = DateFormat.getDateTimeInstance().format(new Date());
if (background == null)
background = #FF;
Font font = Font.decode(Font.SERIF).deriveFont(fontsize);
TextLayout textLayout = new TextLayout(String.valueOf(text), 
font, new FontRenderContext(null, true, true));

Rectangle2D bounds = textLayout.getBounds();
BufferedImage image = new BufferedImage((int) 
(bounds.getWidth() + 0.5), (int) (bounds.getHeight() + 0.5), 
BufferedImage.TYPE_INT_ARGB);

Graphics2D g = image.createGraphics();
g.setColor(Color.decode(String.valueOf(background)));
textLayout.draw(g, (float) -bounds.getX(), (float) -bounds.getY());
g.dispose();
ImageIO.write(image, png, this.out);
}

}



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



Re: Streaming buffered image using Cocoon

2011-05-23 Thread Thomas Markus

Hi,

thats pretty simple. Create a reader like this (creates a png with 
current timestamp in red):


public class TestImageReader extends AbstractReader {

public String getMimeType() {
return image/png;
}

public void generate() throws IOException, SAXException, 
ProcessingException {

String date = DateFormat.getDateTimeInstance().format(new Date());
Font font = Font.decode(Font.SERIF).deriveFont(80.f);
TextLayout textLayout = new TextLayout(date, font, new 
FontRenderContext(null, true, true));

Rectangle2D bounds = textLayout.getBounds();
BufferedImage image = new BufferedImage((int) 
bounds.getWidth(), (int) bounds.getHeight(), BufferedImage.TYPE_INT_ARGB);

Graphics2D g = image.createGraphics();
g.setColor(Color.RED);
textLayout.draw(g, (float) -bounds.getX(), (float) -bounds.getY());
g.dispose();
ImageIO.write(image, png, this.out);
}

}

in your sitemap define and use this reader:
map:components
map:readers
map:reader name=timeimg src=test.TestImageReader /
/map:readers
/map:components

...

map:match pattern=time.jpg
  map:read type=timeimg /
/map:match


hth
Thomas


Am 21.05.2011 14:00, schrieb JeVeoy:


First of all: thank you so much for helping me out, Steven  Thomas!

Then: I've tried my best to see if I could get a working example to run
using either javax.imageio.ImageIO.write(RenderedImage, String,
OutputStream) or AbstractReader.out, but to no luck. Googling didn't quite
help either. I'm very sorry for my lack of knowledge... Hope you can forgive
me.

Pipeline for an image-reader is, as far as I know, defined in sitemap.xmap
like this:

map:match pattern=*.jpg
   map:read type=image src=path/{1}.png mime-type=image/png
   /map:read
/map:match

How can I make use of AbstractReader.out in this definition?



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



Re: Streaming buffered image using Cocoon

2011-05-20 Thread Thomas Markus

hi,

create a reader and stream your image. see AbstractReader.out and beware 
of org.apache.cocoon.util.BufferedOutputStream.realFlush()


regards
Thomas


You can use
javax.imageio.ImageIO.write(RenderedImage, String, OutputStream)
to write directly into an OutputStream.

You just need to get the OutputStream from the original HTTP request.

HTH,
Steven



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



cocoon-forms in cocoon3

2011-04-20 Thread Thomas Markus

Hi,

is it possible to use cocoon-forms in cocoon3? i want to use forms, 
flowscript, jx (whithout ajax)



/Thomas

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



Re: [C2.2] Original name of uploaded file

2011-04-19 Thread Thomas Markus

in your flowscript do something like:

/** @type org.apache.cocoon.servlet.multipart.Part */
var file = form.getChild(uploadFile).value;
if (file!=null) { // no file upload
var filename = file.filename;
// check for single name and change extension
}


regards
Thomas

Am 19.04.2011 09:47, schrieb Matthias Müller:

I am using a fileupload widget and flowscript.
My flow function looks like that:

function myTask() {
 var form = new Form(cocoon.parameters[definitionURI]);
 form.showForm(myTask-form);
 var file = form.getChild(uploadFile);
 var viewData = { filename : file.getValue() + .pdf };

 cocoon.sendPage(myTask.pdf, viewData);
}

In the sitemap.xmap I do the fo transformation and renaming:

map:match pattern=myTask.pdf
   map:generate type=file src=upload://uploadFile/
   map:transform type=xslt-saxon src=stylesheets/toFO.xsl /
   map:act type=set-header
   map:parameter name=Content-Type
value=application/x-download/
   map:parameter name=Content-Disposition value=attachment ;
filename={flow-attribute:filename}/
/map:act
   map:serialize type=fo2pdf/
/map:match

The only problem is that i receive the full path (value of the upload widget)
instead of the name of the uploaded file.

How and where (flow script / sitemap) do i need to resolve the filename? The
getValue() method seems to only return the widgets value. Do I need to cast the
form.getChild(uploadFile) to org.apache.cocoon.servlet.multipart.Part instead?
How can I achieve that?

Thanks, Matthias




- Ursprüngliche Mail 
Von: Thomas Markust.mar...@proventis.net
An: users@cocoon.apache.org
Gesendet: Dienstag, den 19. April 2011, 7:47:42 Uhr
Betreff: Re: [C2.2] Original name of uploaded file

Hi,

when using a fileupload widget your value is of type
org.apache.cocoon.servlet.multipart.Part
It contains upload filename and content

regards
Thomas

Am 18.04.2011 14:46, schrieb Matthias Müller:

Hi there,

in my cocoon app i have a simple transformation xml -   fo -   pdf. The
resulting
pdf needs to be named as the uploaded xml file + .pdf extension.
How can I achieve that? Is there a way to access the data of the uploaded file
in the sitemap.xmap / flow.js?

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: [C2.2] Original name of uploaded file

2011-04-19 Thread Thomas Markus

yes,

look into org.apache.cocoon.servlet.multipart.Part
there are 2 methods getUploadName() and getFileName()

/Thomas

Am 19.04.2011 13:57, schrieb Matthias Müller:

with your solution the filename is undefinded. Is it possible to cast file to
org.apache.cocoon.servlet.multipart.Part to access the filename attribute?




- Ursprüngliche Mail 
Von: Thomas Markust.mar...@proventis.net
An: users@cocoon.apache.org
Gesendet: Dienstag, den 19. April 2011, 10:02:48 Uhr
Betreff: Re: [C2.2] Original name of uploaded file

in your flowscript do something like:

/** @type org.apache.cocoon.servlet.multipart.Part */
var file = form.getChild(uploadFile).value;
if (file!=null) { // no file upload
var filename = file.filename;
// check for single name and change extension
}


regards
Thomas

Am 19.04.2011 09:47, schrieb Matthias Müller:

I am using a fileupload widget and flowscript.
My flow function looks like that:

function myTask() {
  var form = new Form(cocoon.parameters[definitionURI]);
  form.showForm(myTask-form);
  var file = form.getChild(uploadFile);
  var viewData = { filename : file.getValue() + .pdf };

  cocoon.sendPage(myTask.pdf, viewData);
}

In the sitemap.xmap I do the fo transformation and renaming:

map:match pattern=myTask.pdf
map:generate type=file src=upload://uploadFile/
map:transform type=xslt-saxon src=stylesheets/toFO.xsl /
map:act type=set-header
map:parameter name=Content-Type
value=application/x-download/
map:parameter name=Content-Disposition value=attachment ;
filename={flow-attribute:filename}/
 /map:act
map:serialize type=fo2pdf/
/map:match

The only problem is that i receive the full path (value of the upload widget)
instead of the name of the uploaded file.

How and where (flow script / sitemap) do i need to resolve the filename? The
getValue() method seems to only return the widgets value. Do I need to cast

the

form.getChild(uploadFile) to org.apache.cocoon.servlet.multipart.Part
instead?
How can I achieve that?

Thanks, Matthias




- Ursprüngliche Mail 
Von: Thomas Markust.mar...@proventis.net
An: users@cocoon.apache.org
Gesendet: Dienstag, den 19. April 2011, 7:47:42 Uhr
Betreff: Re: [C2.2] Original name of uploaded file

Hi,

when using a fileupload widget your value is of type
org.apache.cocoon.servlet.multipart.Part
It contains upload filename and content

regards
Thomas

Am 18.04.2011 14:46, schrieb Matthias Müller:

Hi there,

in my cocoon app i have a simple transformation xml -fo -pdf. The
resulting
pdf needs to be named as the uploaded xml file + .pdf extension.
How can I achieve that? Is there a way to access the data of the uploaded

file

in the sitemap.xmap / flow.js?

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

-
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 and Single Sign On (Windows Active Directory)

2011-04-13 Thread Thomas Markus

hi,

search for ntlm authentication  jcifs

i would create a filter and set request remoteuser

regards
Thomas


Am 13.04.2011 14:57, schrieb Paul Joseph:

Hi there,

I develop an intranet Cocoon (Cocoon 2.11 and Apache Tomcat 6.0) 
application and have been asked to provide Single Sign On for clients 
running Windows Active Directory.


Does Cocoon provide any SSO support out of the box?

If not, any tips?

Thanks in advance.
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: Calling servlet block from itself?

2011-03-31 Thread Thomas Markus

Hi,

try an absolute name:

map:transform type=servletService
map:parameter name=service  
value=servlet:nl.mpi.lexus.db.service+:/workspace/getSortOrders.xml/
/map:transform


regards
Thomas

Am 31.03.2011 13:04, schrieb Huib Verweij:

Hi,

I would like to call a servlet from within a servlet, e.g.:

map:transform type=servletService
 map:parameter name=service  
value=servlet:db:/workspace/getSortOrders.xml/
/map:transform

from within the db-servlet itself. I realize this is somewhat like a recursive 
call and it could lead to unpleasant behavior. I also realize I have setup my 
blocks incorrectly and probably need to create more blocks, pushing the code I 
want to call to the basic 'bottom' block. But it would help for now if this is 
possible :-).

The above statement fails, so I tried to add:

servlet:connections
 entry key=db value-ref=nl.mpi.lexus.db.service/
 entry key=display value-ref=nl.mpi.lexus.display.service/
/servlet:connections

to the servlet context for db:

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

but then things fail to startup properly.

So, it's not that I can't imagine why this is tricky, but on the other hand I can see 
this might be useful. An alternative I see would be to use amap:resource/  
but unfortunately the code I'm trying to call is in a different sitemap.xmap. Any 
suggestions are appreciated.

Hartelijke groet,

Huib.




--
Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands
t +31-24-3521911
e huib.ver...@mpi.nl
w http://www.mpi.nl/






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



Re: how-to execute pipeline as side-effect first [cocoon2.2]

2011-02-25 Thread Thomas Markus

hi,

have a look at org.apache.cocoon.transformation.SourceWritingTransformer

regards
Thomas

Am 25.02.2011 11:56, schrieb Robby Pelssers:

Hi all,

I have a question related to following use case:

I convert the contents of a few xml files into a DITA map and topics. I already 
have a pipeline which writes the map and topics to disc.  A colleague of mine 
customizes the DITA toolkit stylesheets to our needs.

Now I want the user to be able to show a page with 2 buttons:

-preview XHTML
-preview PDF

To use the customized DITA toolkit i first need to export the files to disc and 
next call the corresponding dita pipeline to generate the xhtml or pdf.

How can i accomplish in 1 go that first the files get written to disc and next 
the other pipeline is executed on top of it?  I was already thinking of using 
an aggregator but I'm not sure if the first part get's executed before the 
second part is called?!  Or can I accomplish the side-effect of generating the 
files first with some other approach?

map:match pattern=preview_pdf/*
  map:aggregate
   map:part src=cocoon://generateFiles/*/
   map:part src=cocoon://dita_2_pdf_pipeline/*/
  /map:aggregate
map:match


Thx for any hints.
Robby

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



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

upgrade spring in cocoon 2.2

2011-01-25 Thread Thomas Markus

hi,

i'm trying to use cocoon 2.2 with latest spring release. jetty start 
fails with


java.lang.AbstractMethodError: 
org.apache.cocoon.tools.rcl.springreloader.SynchronizedConfigureableWebApplicationContext.setId(Ljava/lang/String;)V


i found this change in org.apache.cocoon:cocoon-maven-plugin:1.0.0
but this is not released. i tried to build that version (svn tag 
checkout) but that fails (inkonsistent parents, one is cocoon:8, another 
cocoon:5 aso)


is there a repository with a current cocoon 2.2 version released?

regards
Thomas



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



Re: Adding my Java code to flowscript

2011-01-23 Thread Thomas Markus

Hi,

dont use the default package. Place your class in a package (fi 
test.Test) and it should work.


regards
Thomas


Am 23.01.2011 01:25, schrieb Des Magner:

Hi

I am trying to add some custom code to be called from my flowscript 
but with no success. I followed the instructions in the user 
documentation to the letter 
(http://cocoon.apache.org/2.1/userdocs/flow/java.html). I have added 
my source directory entry to the component-instance in the format 
file:/path/to/my/source but it doesn't seem to want to pick up the 
code. Say I have the following code in my flowscript:


var resource = new Packages.Test();

with the file Test.java placed in my source dir as specified above, I 
consistently get the following error:


org.mozilla.javascript.EvaluatorException: file:///js, line ..: 
Not a Java class: [JavaPackage Test]


I can get around it by placing the compiled class in the 
cocoon/WEB-INF/classes directory but this is not a very elegant solution.


Any help would be greatly appreciated.
Thanks
Des

-
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: form encoding issues

2010-09-29 Thread Thomas Markus

 Hi,

check out request character encoding. For tomcat look at 
http://confluence.atlassian.com/display/DOC/Configuring+Tomcat%27s+URI+encoding 
and in your tomcat installation at 
webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java


that worked for me

regards
Thomas


Am 29.09.2010 11:11, schrieb Ron Van den Branden:

Hi,

I'm stumbling on a character encoding issue (cocoon-2.1.10) and really 
can't see why. Apparently, text input in a form is passed on in a 
wrong encoding. I've set Cocoon's default encoding in all thinkable 
places as UTF-8:


web.xml:

servlet
servlet-nameCocoon/servlet-name
!-- .. --
init-param
param-namecontainer-encoding/param-name
param-valueUTF-8/param-value
/init-param
init-param
param-nameform-encoding/param-name
param-valueUTF-8/param-value
/init-param
!-- ... --
/servlet

sitemap.xmap

map:serializer logger=sitemap.serializer.xhtml 
mime-type=text/html name=xhtml
pool-max=${xhtml-serializer.pool-max} 
src=org.apache.cocoon.serialization.XMLSerializer

doctype-public-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/doctype-system 


encodingUTF-8/encoding
/map:serializer

Yet, when I execute following pipeline:

map:match pattern=test
map:generate src=test.xml/
map:transform src=test.xsl
map:parameter name=use-request-parameters value=true/
/map:transform
map:serialize type=xhtml/
/map:match

...with following minimal source files:

test.xml
===
?xml version=1.0 encoding=UTF-8?
test/

test.xsl (which will mainly echo the previous input)
==
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 
version=2.0

xsl:param name=input/
xsl:template match=/
html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8 /
/head
body
form action=test accept-charset=UTF-8 method=get
input type=text value={$input} name=input/
input type=submit/
/form
pcurrent input: xsl:value-of select=$input//p
/body
/html
/xsl:template
/xsl:stylesheet

Yet, entering a string with accented characters, like e.g. 'très 
annoying', this comes out as: 'très annoying'...
On the other hand, when entering the according URL 
(http://localhost:/test?input=tr%C3%A8s+annoying) directly, the 
characters are passed on correctly. Does anyone know how this can be 
fixed?


Any hints much appreciated!

Ron Van den Branden

-
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: form encoding issues

2010-09-29 Thread Thomas Markus

 thats right but you are bound to ISO-8895-1

we use UTF-8 in all stages with my comments.

regards
Thomas

Am 29.09.2010 11:43, schrieb Ron Van den Branden:

 Hi again,

Thank you very much for the quick help; meanwhile I think I found an 
answer in a post on cocoon-dev: 
http://markmail.org/message/nm6bnvqztbee4s5o. There is stated that 
apparently (and counter-intuitively, IMO), 'request parameters are 
always decoded using ISO-8859-1 ',  and that consequently 
'container_encoding should always be ISO-8859-1 (unless you have a 
broken servlet container), and form_encoding should be the same one as 
on your serializer.'.


And lo: changing the  (over-eager?) container-encoding parameter in 
web.xml back to the default:

init-param
param-namecontainer-encoding/param-name
param-valueISO-8859-1/param-value
/init-param

...seems to do the trick!
(phew!)

(note: I found this info also at 
http://wiki.apache.org/cocoon/RequestParameterEncoding#A3._Decoding_incoming_requests:_Servlet_Container) 



Thanks anyway,

Ron

-
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: form encoding issues

2010-09-29 Thread Thomas Markus

 hi,

that arabic character should fail with latin1.

we see a difference between jetty and tomcat (6.0). tomcat follows specs 
(see Andre's mail) and uses iso per default. you can switch completely 
to UTF-8 with:

- send html content in utf-8
- set container-encoding to utf-8
- set form-encoding to utf-8
- set URIEncoding to utf-8
- and include a class like SetCharacterEncodingFilter to set request 
character encoding


regards
Thomas

Am 29.09.2010 12:36, schrieb Ron Van den Branden:

Hi Thomas,

I'm not much of an expert in encoding matters, and could indeed be 
happy with ISO-8859-1 instead of UTF-8.


However, testing with ISO-8859-1 set as container-encoding, even 
Arabic input is passed through correctly: ص (Arabic letter 'sad' - 
http://www.fileformat.info/info/unicode/char/0635/index.htm) comes out 
as it has been entered.


Does this mean that this (default) ISO-8859-1 container encoding does 
cater for UTF-8 correctly? Otherwise, would you mind expanding on your 
webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java 
suggestion (I'm not much of a Java expert, either ;-))?


OTOH, I don't see any difference between cocoon running in either 
Tomcat or the shipped Jetty.


Kind regards,

Ron

On 29/09/2010 12:11, Thomas Markus wrote:

thats right but you are bound to ISO-8895-1

we use UTF-8 in all stages with my comments.

regards
Thomas




-
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: from wysiwyg-editor to database and/or nice html-output

2010-05-28 Thread Thomas Markus
oh there is a mistake:
use '!DOCTYPE div PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
/tmp/xhtml1-strict.dtd'
and put xhtml1-strict.dtd, xhtml-lat1.ent, xhtml-symbol.ent,
xhtml-special.ent
und /tmp



Am 28.05.2010 07:55, schrieb Thomas Markus:
 and its also a good idea to prepend valid xml / xhtml signature:
 mytext =
 '?xml version=1.0 encoding=UTF-8?'+
 '!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;' +
 'div'+mytext+'/div';

 cocoon.sendPage('my.jx',{ mytext : new 
 Packages.org.apache.cocoon.xml.StringXMLizable( mytext ) });

 if your server has no internet access for dtd resolving setup a simple
 EntityResolver

 hth
 Thomas


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



Re: from wysiwyg-editor to database and/or nice html-output

2010-05-27 Thread Thomas Markus
Hi,

StringXMLizable is a good starting point. Your missing a root element
for xml parsing.

in flow script try:

var mytext = 'an html btext iwith/i content/b.';

call jx with
cocoon.sendPage('my.jx',{ mytext : new
Packages.org.apache.cocoon.xml.StringXMLizable('div'+mytext+'/div') });

an an your jx simply include:
${mytext}

thats all

outside of flowscript create a simple Transformer for this.

regards
Thomas



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



Re: switch Cocoon 2.2 spring dependencies from 2.5.1 to 2.5.6

2010-04-08 Thread Thomas Markus
Hi,

set your version in dependecyManagement section

cocoon2.2 with spring 2.5.6 works fine here (since 2 weeks)

regards
Thomas

Am 07.04.2010 17:04, schrieb Robby Pelssers:
 Hi all,

 Just wondering if anyone tried to switch to a newer version of spring while 
 using Cocoon2.2.  It currently has a dependency on several spring-xxx.jar 
 version 2.5.1.

 I need to integrate spring-ws within my cocoon application and this is giving 
 me headaches (probably) due to dependency conflicts.

 So can anyone explain how to make the switch (on Cocoon side) from using 
 spring 2.5.1 to spring 2.5.6?

 And how big is the risk that Cocoon will not work anymore?


 Any help is very much appreciated.

 Kind regards,
 Robby Pelssers 
   


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



Re: Can't use switch with cocoon.request.get in flowscript [SOLUTION]

2010-02-09 Thread Thomas Markus
hi,

use an type conversion (to javascript string) instead of string concat:

switch (String(cmd)) {
...
}

regards
Thomas

 snip

 function testSwitch() {
   var cmd = getCmd(cmd);
   switch(cmd) {
   case save: 
   print(request parameter was save);
   break;
   case delete: 
   print(request parameter was delete);
   break;
   default:
   print(request parameter was none of the above);
   break;  
   }
 }


 function getCmd(name) {
   return  + cocoon.request.getParameter(name);  // -- we need to make 
 sure we get a native javascript object so our switch will work
 }


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



Re: Cocoon 2.1.11 forms validation on-value-changed

2010-02-07 Thread Thomas Markus
use your own validator (or use an existing) and call validate

fd:field id=density required=true
...
fd:validation
fd:javascript
var value = widget.value;
if (value =0 || value = 500) {
var i18nkey = 'your.key';
var error = new
Packages.org.apache.cocoon.forms.validation.ValidationError(
new
Packages.org.apache.cocoon.forms.util.I18nMessage(i18nkey)
);
// widget should be ValidationErrorAware
widget.setValidationError(error);
return false;
}
return true;
/fd:javascript
/fd:validation
fd:on-value-changed
javascript
if (event.source.validate()) {
// your action
}
javascript
fd:on-value-changed

...


Am 08.02.2010 00:14, schrieb Maria Grigorieva:
 Hello, dear mailing-list )

 Please help if it's possible: I have a form-model with widgets and the
 values of the fields 

 passes to the database on-value-changed action (I haven't any Submit
 buttons at all)

 And for each field I have the validation rules:

 fd:field id=density required=true
   fd:labelDensity/fd:label
   fd:datatype base=float
   fd:convertor type=plain /
   /fd:datatype
   fd:validation
   fd:range min=0 max=5000
   fd:failmessageERROR!!!/fd:failmessage
   /fd:range
   /fd:validation
   fd:on-value-changed
   javascript
   var value = event.source.value;
   var form =  event.source.form;
  var id = new
 java.lang.Integer(form.getAttribute(id).intValue());
   matmodel.setR0(id,value);
   /javascript
   /fd:on-value-changed
   /fd:field

 Please, help! How can I use the validation rules to show the message to the
 user on-value-changed action ??? 


   


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



Bug in pipeline handling in C2.2

2010-01-28 Thread Thomas Markus
Hi,

it seems there is a bug in pipeline handling via flowscript in C2.2

http://cocoon.apache.org/2.2/blocks/flowscript/1.0/1382_1_1.html says in
function sendPage:
uri is the sitemap URI of the page to be sent back to the client. If
the URI starts with a slash, it is resolved starting at the root
sitemap, otherwise it is resolved relative to the current sitemap. The
URI should not contain a scheme (such as cocoon:).

that's ok in C2.1 (tested). In C2.2 a cocoon.sendPage(test.jx); starts
always in root sitemap
test.jx should transform to a cocoon://test.jx call and /test.jx to
a cocoon:/test.js

this new block is mounted at /

with mvn jetty:run an access to http://localhost:/ should generate
only one line in console
sitemapURI=

but there are always 2:
sitemapURI=
sitemapURI=test.jx


whats wrong here?

regards
Thomas

my files:

sitemap.xmap:

?xml version=1.0 encoding=UTF-8?
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:pipelines
map:pipeline
map:act type=log
map:parameter name=level value=info /
map:parameter name=message
value=sitemapURI={request:sitemapURI} /
map:parameter name=console value=true /
/map:act

map:mount src=test/test.xmap uri-prefix= /
/map:pipeline
/map:pipelines

/map:sitemap


test/test.xmap

?xml version=1.0 encoding=UTF-8?
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:pipelines
map:pipeline
map:mount src=test/test.xmap uri-prefix= /
/map:pipeline

/map:pipelines

/map:sitemap


test/test/test.xmap

?xml version=1.0 encoding=UTF-8?
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:pipeline
map:match pattern=**.jx
map:generate src=test.xmap /
map:serialize type=xml /
/map:match
map:call function=test /
/map:pipeline

/map:pipelines
/map:sitemap


test/test/flow/test.js

function test() {
cocoon.sendPage(test.jx);
}



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



Re: Question regarding zip serializer (filename becomes xxxx.continue)

2010-01-13 Thread Thomas Markus
Hi,

Am 13.01.2010 13:13, schrieb Jasha Joachimsthal:
 Yes, use the set-header action
 In map:components
 map:actions
   map:action name=set-header logger=sitemap.action.set-header
 src=org.apache.cocoon.acting.HttpHeaderAction/
 /map:actions

 In the map:pipeline
 map:match pattern=*.zip
   map:act type=set-header
 map:parameter name=Content-Disposition 
 value=attachment;
 filename={1}.zip/
   /map:act

   

and check correct quotes and encoding (if needed). see
http://tools.ietf.org/html/rfc2183
Especially IE has some disadvantages with incorrect filenames.


regards
Thomas

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



Re: File upload without full form submit.

2010-01-12 Thread Thomas Markus
for multiple uploads try a browser plugin like
http://jupload.sourceforge.net/

regards
Thomas

Am 10.01.2010 20:36, schrieb Tomek Piechowicz:
 Hi.

 I have form with 3 repeaters, one contains standard text input
 widgets, and the next two contain file upload widgets. User can add
 file inputs, select files, and press submit button which will submit
 form and redirect from form page.

 I would like to add separate submit button to each upload widget in
 repeater and upload each file without submitting whole form and
 redirect from page.

 Is it possible ? Can anyone give mi some tips how to do it ?

 Regards,
 Tomek Piechowicz

 -
 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: Springframework Exception / Cocoon3 Alpha1

2009-12-22 Thread Thomas Markus
hi,

set current spring version in your pom dependencyManagement section

regards
Thomas

Am 22.12.2009 14:08, schrieb Johannes Lichtenberger:
 Hello,

 it seems I'm getting the exact same exception on a computer running
 Windows 7:

 http://mail-archives.apache.org/mod_mbox/cocoon-users/200905.mbox/%
 3c7c655c04b6f59643a1ef66056c0e095e023cb...@eusex01.sweden.ecsoft%3e

 Our cocoon app is running on Ubuntu Linux 9.10, Mac OS X and on another
 Windows 7, so it's a bit strange :-/

 We even tried to copy the .m2/repository directory, everything else is
 in a subversion repository.

 So it seems the spring version alpha1 uses is buggy?

 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: cocoon3 sitemap call

2009-12-07 Thread Thomas Markus
i missed the aop part

it would be great to move all servlet independent parts outside of
cocoon-servlet (CallStack ...), maybe to cocoon-pipeline

currently i cant use cocoon-servlet as dependency (and dont want).

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.apache.cocoon.blockdeployment.BlockContextURLStreamHandlerFactory'
defined in class path resource
[META-INF/cocoon/spring/cocoon-blockdeployment-protocol.xml]:
Initialization of bean failed; nested exception is
java.lang.ClassCastException:
org.springframework.context.support.ClassPathXmlApplicationContext
cannot be cast to org.springframework.web.context.WebApplicationContext

i try to run a sitemap inside a junit test without any servlet specific
parts. this works fine without coocon-servlet. after copying CallFrame,
CallStack, MimeTypeCollector and spring config (ugly i know) mimetype is ok.

regards
Thomas


Reinhard Pötz schrieb:
 Thomas Markus wrote:
   
 hi,

 i tried to manually load and invoke a sitemap and it works fine now. but
 how can i access resulting content type? i cant find something.
 

 Have a look at the RequestProcessor in the cocoon-servlet module. It's
 an example of how to invoke a sitemap in a servlet environment.

 That's also my advice for your cocoon3 inside portlets question - and
 maybe you can even use the RequestProcessor directly but I'm not sure if
 you have access to everything that it needs (see the RequestProcessor's
 constructor).

   


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



cocoon3 sitemap call

2009-12-04 Thread Thomas Markus
hi,

i tried to manually load and invoke a sitemap and it works fine now. but
how can i access resulting content type? i cant find something.

thx
Thomas

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



cocoon3 inside portlets

2009-12-04 Thread Thomas Markus
hi,

whats the best approach to use cocoon3 as portlet content producer?

currently i use cocoon3 trunk and build a running sample


regards

Thomas

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



Re: Accessing resource from reader

2009-09-18 Thread Thomas Markus
Hi,

depends on file location. is it in your classpath use
getClass().getResourceAsStream()
as file inside your sitemap structure try (in BarcodeImageReader.setup )

Context context = ObjectModelHelper.getContext(objectModel);
File file = new File(context.getRealPath(barcode-cfg.xml));

location is relative to your sitemap

regards
Thomas



Radaven schrieb:
 Hi, I am working on my BarcodeImageReader which generates barcode image. The
 parameters of barcode are loaded from xml config file (saved on same place
 as other resources like jx templates, etc.). 

 How can I get to this file to have it as java.io.File? I guess I cannot use
 something like 

 File file = new File(barcode-cfg.xml);

 Is there some getResource method or something like that available?
   


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



Re: Restricting access by IP address

2009-09-14 Thread Thomas Markus
try a generic RegexMatcher (all untested :) )

greets
thomas

in your sitemap add this to components with your pattern:
map:matchers default=wildcard
map:matcher name=regular src=test.RegexMatcher
pattern^192\.168\.\d+\.\d+/pattern
/map:matcher
/map:matchers

and in your pipeline:

map:match pattern={request:remoteAddr} type=regular
!-- matched content, access regex groups  with {0} or {1} ... --
/map:match
!-- unmatched content --


package test;

import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.matching.Matcher;
import org.apache.cocoon.sitemap.PatternException;

public class RegexMatcher extends AbstractLogEnabled implements Matcher,
Configurable, ThreadSafe {

private Patternregexpattern;

public void configure(Configuration configuration) throws
ConfigurationException {
regexpattern =
Pattern.compile(configuration.getChild(pattern).getValue().trim());
}

public Map match(String pattern, Map objectModel, Parameters
parameters) throws PatternException {
java.util.regex.Matcher m = regexpattern.matcher(pattern);
if (m.matches()) {
HashMapString, String h = new HashMapString, String();
for (int i = 0, j = m.groupCount(); i = j; i++)
h.put(String.valueOf(i), m.group(i));
return h;
}
return null;
}

}


Peter Flynn schrieb:
 Peter Flynn wrote:
 Thomas Markus wrote:
 hi,

 look at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access

 or use a matcher/selector in your sitemap

 map:select type=parameter
 map:parameter name=parameter-selector-test
 value={request:remoteAddr} /
 map:when test=127.0.0.1
 !-- actions for this ip --
 /map:when
 map:otherwise
 !--  --
 /map:otherwise
 /map:select

 That look like the right approach...except I can't find any
 documentation at
 http://cocoon.apache.org/2.2/core-modules/core/2.2/840_1_1.html on
 the syntax of the test attribute.

 I found some under the entry for Parameter Selector but it appears
 that the test will only perform a plain equality. Is there a way to
 perform a substring operation; when testing an IP address for access
 permission I want to allow all xxx.yyy.*.* and prohibit everything else.

 ///Peter

 -
 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: Restricting access by IP address

2009-09-10 Thread Thomas Markus
hi,

look at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access

or use a matcher/selector in your sitemap

map:select type=parameter
map:parameter name=parameter-selector-test
value={request:remoteAddr} /
map:when test=127.0.0.1
!-- actions for this ip --
/map:when
map:otherwise
!--  --
/map:otherwise
/map:select

regards
thomas

Peter Flynn schrieb:
 Jeroen Reijn wrote:
 Hi Peter,

 have you also considered doing this with a webserver in front of your
 cocoon application?

 Yes, we currently front Tomcat with Apache httpd as a virtual host,
 but it's at the top level, eg

 VirtualHost *:80
 ServerAdmin pfl...@ucc.ie
 ProxyPreserveHost On
 ProxyPass / ajp://localhost:8009/
 ProxyPassReverse / ajp://localhost:8009/
 ServerName foobar.ucc.ie
 ErrorLog logs/foobar.ucc.ie-error_log
 CustomLog logs/foobar.ucc.ie-access_log combined
 /VirtualHost

 I can't seem to find any information about how to refine this so that
 access to the specific URI for the feed gets checked, and all other
 accesses get allowed, unless I create a separate VH for that feed only.

 ///Peter


 -
 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: How to set filename of csv file

2009-04-01 Thread Thomas Markus

Hi,

sure you can. Set a special http-header. fi:

Content-Disposition: attachment; filename=MyFileName.csv

use attachment to force 'save as...' dialog or inline for default 
browser integration. filename has a special encoding. see 
http://www.ietf.org/rfc/rfc2231.txt and http://www.ietf.org/rfc/rfc2184.txt


regards
thomas

cocoon.er...@besonet.ch schrieb:

Hello,

in my application if a page, where a search can be performed and the 
result is shown on the same page in form of a list.


On the page, the user has a button (action widget) that returns him 
the search result as a csv file. That's not a problem, this works. The 
problem I have is the filename. The file is named as the current page 
is. Somesing crypted with continuation id and .continue at die end. 
Can I set the name of the file, the csv is serialized to the user?


Here my current code:

flowscript:

list() {

  //some code


  var form = new Form(pages/form/list_model.xml);

  form.createBinding(pages/form/list_binding.xml);

  while(true) {
form.load(to);
form.showForm(list.form, {
  itemList:itemList
});
form.save(to);
   
var action = form.submitId;

if (search.equals(action)) {
  itemList = 
BridgeFactory.getInstance().getDummyBridge().search(context, to);

} else if (resetButton.equals(action)) {
  to = new SearchTO();
  itemList = null;
} else if (csv.equals(action)) {
  cocoon.sendPage(list.csv, {itemList:itemList});
  break;
}
  }
}

sitemap:

map:serializer name=csv mime-type=application/x-csv 
src=org.apache.cocoon.serialization.TextSerializer

encodingISO-8859-1/encoding
omit-xml-declarationyes/omit-xml-declaration
/map:serializer


map:match pattern=*.csv
   map:generate src=pages/csv/{1}.csv/
   map:transform type=jx/
   map:transform src=stylesheets/csv.xsl /
   map:transform type=dbi18n
  map:parameter name=locale value={../locale} /
   /map:transform
   map:serialize type=csv /
/map:match

Thanks,

Mike


--
Thomas Markus


proventis GmbH | Zimmerstr. 79-81 | D-10117 Berlin |
Tel +49 (0)30 2936399-22 | Fax -50 | t.mar...@proventis.net
-
Geschäftsführer: Norman Frischmuth | Sitz: Berlin
Handelsregister: AG Berlin-Charlottenburg, HR 82917
-
Blue Ant-webbasiertes Projektmanagement - aktuelle Termine 2008:
http://www.proventis.net/website/live/blueant/veranstaltungen.html


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.mar...@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


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

Re: what is causing this error

2009-03-31 Thread Thomas Markus

hi,

you have a '--' inside a comment

this is not valid. fi:
!--  some -- test --
raises this exception

regards
Thomas

Paul Joseph schrieb:

Hi there,

I upgraded to Cocoon 2.1.11 and things are fine, other than I get this 
error in my Tomcat server log.
Also, my debug statements in my Flowscript do not show up in the 
Tomcat log as they used to.

Any pointers would be appreciated.

thx!
Paul

log4j:WARN No appenders could be found for logger 
(org.apache.commons.digester.Digester.sax).

log4j:WARN Please initialize the log4j system properly.
Logging Error: Could not set up Cocoon Logger, will use screen instead
org.xml.sax.SAXParseException: The string -- is not permitted within 
comments.
   at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)

   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
   at org.apache.xerces.impl.XMLScanner.scanComment(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)

   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
   at 
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.build(DefaultConfigurationBuilder.java:254) 

   at 
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.build(DefaultConfigurationBuilder.java:202) 

   at 
org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:849) 

   at 
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:356)
   at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) 

   at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
   at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956) 

   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
   at 
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105) 


   at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) 

   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) 

   at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306) 

   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) 

   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) 

   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) 


   at java.lang.Thread.run(Unknown Source)


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



--
Thomas Markus


proventis GmbH | Zimmerstr. 79-81 | D-10117 Berlin |
Tel +49 (0)30 2936399-22 | Fax -50 | t.mar...@proventis.net
-
Geschäftsführer: Norman Frischmuth | Sitz: Berlin
Handelsregister: AG Berlin-Charlottenburg, HR 82917
-
Blue Ant-webbasiertes Projektmanagement - aktuelle Termine 2008:
http://www.proventis.net/website/live/blueant/veranstaltungen.html



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



Re: what is causing this error

2009-03-31 Thread Thomas Markus

hi,

looks like it happens while parsing your logging configuration. check 
log4j.xconf or logkit.xconf (or what you configured)


regards
Thomas


Paul Joseph schrieb:
Thanks for the reply--but is there any indication which file has 
this?  There are so many conf files with so many comments!


rgds
Paul

Thomas Markus wrote:

hi,

you have a '--' inside a comment

this is not valid. fi:
!--  some -- test --
raises this exception

regards
Thomas




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



Re: Digestion problems, can't MD5 (Cocoon 2.1)

2009-02-09 Thread Thomas Markus

hi,

first try to iterate over all available provider. fi:
for (java.security.Provider p : java.security.Security.getProviders()) {
   ArrayListString a = new ArrayListString();
   for (java.security.Provider.Service s : p.getServices())
   if (MessageDigest.equals(s.getType()))
   a.add(s.getAlgorithm());
   System.out.println(p.getName() ++ a);
}

it gives for sun jdk1.6:
SUN  [MD2, MD5, SHA, SHA-256, SHA-384, SHA-512]
SunRsaSign  []
SunJSSE  []
SunJCE  []
SunJGSS  []
SunSASL  []
XMLDSig  []
SunPCSC  []

check your java.security setup

regards
thomas



Palol Carlos schrieb:

Hi list,

i'm having problems to generate a simple MD5.
if I serve an XSP with just this line in xsp:logic

java.security.MessageDigest md = 
java.security.MessageDigest.getInstance(MD5);

i do it that way and it works fine (sun java5+6)


I get a NoSuchAlgorithmException.

The first option in my java.security (1.5) is 
sun.security.provider.Sun and this I can instantiate without any 
problem. If I try:


java.security.Provider p = new sun.security.provider.Sun();
java.util.Set servicios = p.getServices();
Object[] serviciosarray = servicios.toArray();
java.security.Provider.Service md5service = 
(java.security.Provider.Service) serviciosarray[6];

...
xsp:exprmd5service.toString()/xsp:expr

Shows:
SUN: MessageDigest.MD5 - sun.security.provider.MD5 attributes: 
{ImplementedIn=Software}


Is it related to Cocoon? (sorry if it isn't)

i think it itsn't


Thanks in advance for any help,

--
Carlos Palol



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



possible bug in SitemapSource

2009-01-29 Thread Thomas Markus

hi,

mimetype detection in in 
org.apache.cocoon.components.source.impl.SitemapSource seems not 
correct. field mimetype is initialized in init(). at this time the 
mimetype is not valid (always null). i modified getMimeType() (see below).


found in 2.1.7 , 2.1.8 , 2.1.11 , 2.2.0

public String getMimeType() {
   if (this.mimeType == null) {
   if (this.environment != null)
   this.mimeType = this.environment.getContentType();
   else if (this.redirectSource != null)
   this.mimeType = this.redirectSource.getMimeType();
   }
   return this.mimeType;
}

regards
thomas

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.mar...@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


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

store contents of a pipeline

2009-01-27 Thread Thomas Markus

hi all,

i try to cache the output from a sitemap (and i cant use cached 
pipelines). this sitemap returns only generated content (html and 
images). i created an action thats verifies my cache and calls an uri to 
store pipeline output.  my applications works fine without this action.


it works but i have 2 problems:
- html content is parsed as xml. my original pipeline has a serialize 
type=html / but content is in xml (with ?xml? header and entities). 
binary content like images are ok

- property mimetype from source is always empty (see java part below)

how can i access the correct content and mimetype? system is cocoon 2.1.7

regards
thomas

!--pipeline --
map:pipelines

   map:pipeline internal-only=true
   map:match pattern=**
   map:mount uri-prefix= src=../sitemap.xmap /
   /map:match
   /map:pipeline

   map:pipeline
   map:match pattern=**
   map:act type=checkcache src=cocoon:/{1}

   map:read src={file} mimetype={mimetype} /
   /map:act
   map:mount uri-prefix= src=../sitemap.xmap /
   /map:match
   /map:pipeline

/map:pipelines


/* action snippet */
Source src = resolver.resolveURI(source);
try {
   FileOutputStream out = new FileOutputStream(file);
   try {
   InputStream in = src.getInputStream();
   IOUtil.copy(in, out);
   } finally {
   out.close();
   }
   // this is never correct!
   src.getMimeType();
} finally {
   resolver.release(src);
}

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.mar...@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


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

Re: store contents of a pipeline

2009-01-27 Thread Thomas Markus
problem found. a cocoon:/{1} created always an internal-only request and 
my sub sitemap expects an external request. how can i create an external 
request from an internal action? i dont want to reimplement SitemapSource


regards
thomas


Thomas Markus schrieb:

hi all,

i try to cache the output from a sitemap (and i cant use cached 
pipelines). this sitemap returns only generated content (html and 
images). i created an action thats verifies my cache and calls an uri 
to store pipeline output.  my applications works fine without this 
action.


it works but i have 2 problems:
- html content is parsed as xml. my original pipeline has a serialize 
type=html / but content is in xml (with ?xml? header and 
entities). binary content like images are ok

- property mimetype from source is always empty (see java part below)

how can i access the correct content and mimetype? system is cocoon 2.1.7

regards
thomas

!--pipeline --
map:pipelines

   map:pipeline internal-only=true
   map:match pattern=**
   map:mount uri-prefix= src=../sitemap.xmap /
   /map:match
   /map:pipeline

   map:pipeline
   map:match pattern=**   map:act 
type=checkcache src=cocoon:/{1}

   map:read src={file} mimetype={mimetype} /
   /map:act
   map:mount uri-prefix= src=../sitemap.xmap /
   /map:match
   /map:pipeline

/map:pipelines


/* action snippet */
Source src = resolver.resolveURI(source);
try {
   FileOutputStream out = new FileOutputStream(file);
   try {
   InputStream in = src.getInputStream();
   IOUtil.copy(in, out);
   } finally {
   out.close();
   }
   // this is never correct!
   src.getMimeType();
} finally {
   resolver.release(src);
}

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


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.mar...@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


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

Re: .DOC and .PPT modifying

2007-10-17 Thread Thomas Markus

Hi,

OOo files (and newer MS-files like docx) are zip files with multiple 
files inside. OOo has a content.xml + attachments and styles. You can 
unzip that file, modify content.xml, modify attachments and then zip it 
again.


tm

Joerg Heinicke schrieb:

On 17.10.2007 9:02 Uhr, Luiz Antonio Falaguasta Barbosa wrote:


On the other hand, the newer office productivity file formats are all
XML-based (both OpenDocument and that other Microsoft equivalent) and
Cocoon excels at handling XML.


Yeah man! That's point for me now!
My client told me that I can consider the usage of Office 2003 for the
users. So, all the office types are XML-based, right?


Are they really? Isn't there still the binary Excel format and a 
second XML-based one? I'm absolutely not sure, haven't worked with it 
myself. Just what I heard ...


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Custom Reader: flush() and close() required?

2007-10-02 Thread Thomas Markus

Hi,

flush is required. i got problems without.

Tilman Rassy schrieb:

Hello,

I have a question concerning custom Readers:

Assume the custum Reader extends AbstractReader. Is it necessary to call
this.out.flush() and this.out.close() after the content has been written?

Thanks in advance,
Tilman

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: transformator should add a tag

2007-08-30 Thread Thomas Markus

hi,

use startElement / endElement

/tm

cocoon.erard schrieb:
Hello, 

I've written a custom transformator, that replaces some text in the source and in some special case, this transformator should also add a tag behind this given tag. 


My problem is now, that when the transformator adds a tag example / he makes 
lt;example /gt;. How do I have to add the  and  signs?

Thanks Mike 




QuickLine WebMail - http://www.QuickLine.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  
begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to limit number of instances of component?

2007-08-29 Thread Thomas Markus




Im currently thinking of adding some hack in the imageop resize
operator, something like a counter mutex that halts processing of the
raster until the counter is low. (I dont quite remember how to do
stuff like that in Java so I would have to look it up)
  

hi, use java.util.concurrent.Semaphore

cu
tm

--
Thomas Markus

Tel:+49 30 29 36 399 - 22
Fax:+49 30 29 36 399 - 50
Mail:   [EMAIL PROTECTED]
Web:http://www.proventis.net
Web:http://www.blue-ant.de

proventis GmbH
Zimmerstraße 79-80
10117 Berlin

Geschäftsführer: Norman Frischmuth
Sitz: Berlin
Handelsregister: AG Berlin-Charlottenburg, HR 82917

We support your project business!

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: http headers

2007-08-27 Thread Thomas Markus

sure, use org.apache.cocoon.acting.HttpHeaderAction

franco pace schrieb:

Hello,
Is it possible to set http response headers from a pipeline?

Thanks,
Franco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Thomas Markus

Tel:+49 30 29 36 399 - 22
Fax:+49 30 29 36 399 - 50
Mail:   [EMAIL PROTECTED]
Web:http://www.proventis.net
Web:http://www.blue-ant.de

proventis GmbH
Zimmerstraße 79-80
10117 Berlin

Geschäftsführer: Norman Frischmuth
Sitz: Berlin
Handelsregister: AG Berlin-Charlottenburg, HR 82917

We support your project business!

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Initializing a multivaluefield?

2007-06-14 Thread Thomas Markus

hi ,

try

model.myMultivalueField = [key1, key2 ,key3];

tm

Derek Hohls schrieb:

Hi
 
I am struggling to initialize the selected values for a 
multivaluefield.
 
In the flowscript I have the usual:

var model = myForm.getModel()
 
and for a simple text field I have something like:

model.myTextField = foobar;
 
but when I try and set an array of values for the initial 
multivaluefield selection, I cannot seem to find the 
correct syntax e.g.
 
model.myMultivalueField[0] = foo;

model.myMultivalueField[1] = bar;
 
gives a null pointer error?
and 
 
model.myMultivalueField.push( foo );
 
gives a syntax error.
 
There is obviously a simple way to do this - please

help!
 
Thanks

Derek
 
P.S. I am not using Hibernate or any POJOs - just working

in POJ (Plain 'ol Javascript).

  


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: AW: Initializing a multivaluefield?

2007-06-14 Thread Thomas Markus

:)


I confounded this with the widget.value

Franziska Witzani schrieb:

For what reason do you want to change the data model?
Before or after showing the page?

If after:
As far as I know the model is just a js-copy of the form-object's values.
So the member myMultivalueField is not initialized.

You could do it like:

model.myMultivalueField = new Object();
model.myMultivalueField[0] = foo;
model.myMultivalueField[1] = bar;

Or, if you want to change it before showing the page (eg. for setting the 
selection list on the widget), try:

values = new Array();
values[0] = 'foo';
values[0] = 'bar';
myForm.lookupWidget('myMultivalueField').setValue(values);

(set the data directly on the Form-Object!)
Actually I didn't test this variant yet- if it doesn't work, try the next one!

Or:

Values = new Array();
values[0] = {value: foo};
values[1] = {value: bar};
myForm.showForm(pipeName, {myMultivalueField: values});

Greetings, Franzi

  


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Importing a javascript file in cform

2007-06-12 Thread Thomas Markus

add your .js file to
map:flow language=javascript
  map:script src=file1.js/


Re: Problem with tuning JVM (high CPU load)

2007-05-23 Thread Thomas Markus

Hi,

looks like a memory leak. maybe the garbage collector runs very often

thomas


Robby Pelssers schrieb:


Hi all,

we have cocoon2.1.10 running on a solaris(OS version5.8).  The server 
has 16G of memory and 2 processors (sparcv9 processors operating at 
900 MHz). Cocoon is running on tomcat/4.1.24.


After a while we see our CPU increasing to about 94% and the system 
becomes non-responsive.  Could anybody point to what we look for?  We 
can't trace the problem back from the tomcat loggings.


Cheers,
Robby Pelssers



begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem with tuning JVM (high CPU load)

2007-05-23 Thread Thomas Markus
if your free memory is low, the jvm runs the gc automatically. in case 
your free memory is very low the gc runs very often and consumes a lot 
of cpu. try to log your current memory state in that situation.


Robby Pelssers schrieb:

Hi Thomas,

Actually, we scheduled the garbage collector as a cron job to run every
day at night between 2 and 3 o'clock two times to make sure memory is
freed up when daily operations start again around 7-8 o'clock.  I don't
really see how running the garbage collector can have a negative affect?
And even if there is a memory leak, how do you explain the high CPU
load?

Cheers,
Robby 


-Oorspronkelijk bericht-
Van: Thomas Markus [mailto:[EMAIL PROTECTED] 
Verzonden: woensdag, mei 2007 9:26

Aan: users@cocoon.apache.org
Onderwerp: Re: Problem with tuning JVM (high CPU load)

Hi,

looks like a memory leak. maybe the garbage collector runs very often

thomas


Robby Pelssers schrieb:
  

Hi all,

we have cocoon2.1.10 running on a solaris(OS version5.8).  The server 
has 16G of memory and 2 processors (sparcv9 processors operating at 
900 MHz). Cocoon is running on tomcat/4.1.24.


After a while we see our CPU increasing to about 94% and the system 
becomes non-responsive.  Could anybody point to what we look for?  We 
can't trace the problem back from the tomcat loggings.


Cheers,
Robby Pelssers





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem with tuning JVM (high CPU load)

2007-05-23 Thread Thomas Markus

6g free system or jvm memory? which jvm version?
maybe that article is interesting
http://java.sun.com/developer/technicalArticles/Programming/turbo/


Robby Pelssers schrieb:

Hi Thomas,

The behaviour we see is that the CPU load gradually increases and at a
certain point never goes down while we don't see much action taking
place when monitoring the apache server-status.  Also we still have
around 6G free memory at the time that the CPU remains at about 94%
load.  Heap Size boundaries are Xms=12G=Xmx.

Cheers,
  


begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Matcher parameter

2007-02-19 Thread Thomas Markus

Hi,

use {../1}


Gajo Csaba schrieb:

Hello,

I have a login page. If the user logs in, he can visit all the pages 
he was visiting before, except a different stylesheet will be used to 
generate the pages. The matcher matches *.html. The problem I'm 
having is that the {1} parameter I'm using is always empty!

This is the code:

map:match pattern=*.html
 map:act type=session-validator
 map:parameter name=descriptor 
value=docs/config/params.xml/

 map:parameter name=validate value=username,password/
 !-- user is logged in --
 map:generate type=file src=docs/{1}.xml/   --- HERE
 map:transform src=stylesheets/default.xsl/
 map:serialize/
 /map:act

 !-- user is not logged in --

 map:generate type=file src=docs/{1}.xml/
 map:transform src=stylesheets/default.xsl/
 /map:transform
 map:serialize/
/map:match


So when the user is not logged in, he gets the docs/{1}.xml file 
without any problems. So why does it not work in the case the user is 
logged in?

I get an error saying Cannot find .../docs/.xml

Please help,
Csaba



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Matcher parameter

2007-02-19 Thread Thomas Markus

you got it :)

Gajo Csaba schrieb:

That's great! Thanks, I was trying to figure it out for hours. :)
Does the .. mean I'm going up one tag? So, for example, if a tag is 
embedded in 4 levels, then I have to write {../../../1} ?


Thanks, Csaba



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A slash after a parameter in a a tag causes the tag to be dropped.

2007-01-28 Thread Thomas Markus

that happens if your stylesheet has no matcher but content is copied.
sounds that a stylesheet has a matcher for urls without a / at the end.

Antonio Magni schrieb:

I tried the to use the html serializer instead, but the problem persists.

OK, so here are the details of the mistery:

1) The problem only appears for [EMAIL PROTECTED] tags;

2) The symptom is that the a tag (and all paramters) are dropped,
but the content of it is held intact.

3) Some examples:

Say root=/lenya/default/authoring

a href={$root}Hello!/a

produces

a href=/lenya/default/authoringHello!/a

But!!:

a href={$root}/Hello!/a

produces

Hello!

while running the same example in the same position, but just
substituting href with id (or a with p), produces normal output.

CRAAAYYYZZZE!!

There has to be some funky substitution going on somwhere...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A slash after a parameter in a a tag causes the tag to be dropped.

2007-01-26 Thread Thomas Markus

Hi,

if you use lenya (looks like) then try use html serializer instead of 
xhtml in your publication-sitemap


thomas

Antonio Magni schrieb:

I make use of parameters generated from a sitemap

map:parameter name=root 
value={page-envelope:context-prefix}/{2}/{3}/


from the .xsl file. The parameter {$root} gets subistitued without any
problems in my a href={$root} ... tag. But if I add a slash after
the parameter (as in a href={$root}/ ...) the xsl drops the entire
a tag, and in my resulting .html page, I lose my link. Please note
that when I use the same parameter in earlier in the .xsl file, in
different tags, this behaviour does not occur.

Summarizing:

map:parameter name=root 
value={page-envelope:context-prefix}/{2}/{3}/


and

a href={$root}.../a

works fine.
---
map:parameter name=root 
value={page-envelope:context-prefix}/{2}/{3}/


and

a href={$root}/.../a doesn't work.
-
map:parameter name=root 
value={page-envelope:context-prefix}/{2}/{3}//


( note the added slash after {3}) and

a href={$root}.../a also doesn't work.
--

Am I going nuts? Give me my links back! I mean, before I dive into the
various details, I would like to know if this is something known... I
don't know what to search for in the email lists...

Cocoon 2.1.7



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: xsl:message output

2007-01-23 Thread Thomas Markus

Hi,

System.err is default. check your webserver log or console

thomas

Steven D. Majewski schrieb:


Where does the output of an xsl:message in a stylesheet in cocoon go ?

I've looked in cocoon.log and all of the other log files I could find,
but no trace. I'ld like to use it for debugging, but I can't seem to
find a trace of it.

-- Steve Majewski / UVA Alderman Library


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [contrib] Cocoon editor

2007-01-23 Thread Thomas Markus
maybe its easier to include the schema and use a schema aware xml editor 
(or dtd)


thomas

Olivier schrieb:

Grzegorz Kossakowski wrote:

Olivier napisał(a):

Hi all  happy new year,

I' ve started few months ago to build a sitemap cocoon editor as an 
eclipse plugin.
My first goal was to play with eclipse plugins, EMF, WSTTranslator 
and more ...

I think that the proof of concept is done.
Is there anybody in there that would be interested in contributing :
- code,
- code,
- icons,
- ideas

There was Lepido project at one time but unfortunately it died :(
Have you looked at it?
Yap, but I really don't like the jelly / swt approach. I've tried to 
extend it but don't found it easy to

What functionality your editor covers?

Just editing sitemap.

Is there any place we can see it?
I can provide screen shoot 
(http://www.orcades.net/contrib/cocoon-editor.jpg) or zip file !



I was thinking about developing plug-in for Eclipse's Test and 
Performance Tools Platform, but I have no time for this interesting 
kind of activity, now. Also, higher place on my priority list takes 
writing some tutorials about incoming C2.2. I could help but not 
sooner than in a month. Is there any guarantee that you will have 
enough time to guide the effort?


I don't really want to guide the effort, I just want to contribute 
to the cocoon effort. The only thing I can say is that I will ever and 
ever do my best.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: map parameter wildcard

2006-12-12 Thread Thomas Markus

hi,

try to use {../1}

thomas

許議中 schrieb:

Hi!

I've a sitemap

  map:match pattern=protected-*
map:act type=auth-protect
  map:parameter name=handler value=demohandler/

  map:generate src=cocoon:raw:/{1}.content/
  map:transform type=session/
  map:transform src=page2chtml.xsl/
  map:transform type=encodeURL/
  map:serialize type=chtml/

/map:act
!-- something was wrong, redirect to login page --
map:redirect-to uri=login/
  /map:match

when I submit a url protected-1 to this, {1} can't get the 1, what's wrong.

johnson

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
Thomas Markus

Tel:+49 30 29 36 399 - 22
Fax:+49 30 29 36 399 - 50
Mail:   [EMAIL PROTECTED]
Web:www.proventis.net
Web:www.blue-ant.de

proventis GmbH
Zimmerstraße 79-80
10117 Berlin

proventis: Wir bewegen Organisationen.

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr;dom:;;Zimmerstr. 79-80;Berlin;Berlin;10117
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Kill the cache?

2006-07-06 Thread Thomas Markus

may be you make your caching pipeline processor a non caching

   map:pipes default=noncaching
   map:pipe name=caching 
src=org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline/
   map:pipe name=noncaching 
src=org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline/

   /map:pipes

or you remove the caching type und you got failures if somewhere a 
caching pipeline is defined


Thomas

[EMAIL PROTECTED] schrieb:


This whole situation of cocoon caching other contexts is unacceptable.

 


How do I kill the cache mechanism completely?

 


Thanks

 



--
Thomas Markus

Tel:+49 30 29 36 399 - 22
Fax:+49 30 29 36 399 - 50
Mail:   [EMAIL PROTECTED]
Web:www.proventis.net
Web:www.blue-ant.de

proventis GmbH
Zimmerstraße 79-80
10117 Berlin

proventis: Wir bewegen Organisationen.

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr;dom:;;Zimmerstr. 79-80;Berlin;;10117
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Caching jx with flow (WAS: Is use-store needed when using XSLTC ?)

2006-07-03 Thread Thomas Markus

Hi,

it would be very helpful to have this inforrmations at one place.

thx
Thomas

Ard Schrijvers schrieb:

Hmmm, I hoped my mails would be so clear that it is not needed anymore :-) But 
your right, I probably should, but it takes a lot of time and effort to write 
it down really well

  


--
Thomas Markus

Tel:+49 30 29 36 399 - 22
Fax:+49 30 29 36 399 - 50
Mail:   [EMAIL PROTECTED]
Web:www.proventis.net
Web:www.blue-ant.de

proventis GmbH
Zimmerstraße 79-80
10117 Berlin

proventis: Wir bewegen Organisationen.

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr;dom:;;Zimmerstr. 79-80;Berlin;;10117
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Cocoon Action SingleThreaded

2006-06-27 Thread Thomas Markus
the marker interface SingleThreaded means that an instance is not 
reentrant and can only used in one thread. if another thread needs that 
component a new instance is used. see also interface ThreadSafe 
(http://excalibur.apache.org/apidocs/org/apache/avalon/framework/thread/package-summary.html)


Thomas

Doug Herold schrieb:


I was wonder If someone cloud answer a quick question for me.

*

public *class* StudentViewAction *extends* AbstractAction *implements* 
SingleThreaded {


*

If two different users (they are in seperate sessions) login to our 
website and click a link that calls the above action, will one user 
have to wait on the other user because it is SingleThreaded or is it 
only SingleThread inside of each session.


We are having performance issues and was wonder if this is a bottleneck.

Thanks in advance for your answers

Doug



begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr;dom:;;Zimmerstr. 79-80;Berlin;;10117
email;internet:[EMAIL PROTECTED]
tel;work:+49 30 29 36 399 22
url:http://www.proventis.net
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]