cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject Re: Cocoon Questions...
Date Mon, 31 Jan 2000 19:48:10 GMT
Ricky Szeto wrote:

> I am in the process of migrating a site from being http-servlet based to
> xml-cocoon based. I have two questions that I have been unable to find
> answers for:
> 1) Is there a method of passing initial arguments to a producer? such as
> key-value pairs?
> and also

Just add the values to the url like you would with a GET/POST from a form:
yourProducer.xml?PARAM1=one&PARAM2=two

The getDocument() methods of all producers have access to the
HttpServletRequest object so you can say:
String paramOne = request.getParameter("PARAM1");

> 2) Short of writing my own processor, what method/way can I use to get
> access to HttpServletResponse.encodeURL() ?
> 

One way is to use XSP's to create your producers.  This makes developing
producers extremely easy and the XSP classes have a wrapper for the
HttpServletResponse object so you can use encodeURL() with it.


Mike


Mime
View raw message