cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh" <rice...@gmail.com>
Subject Re: Parameters in request get lost when using servlet: protocol
Date Tue, 03 Apr 2007 04:30:07 GMT
Thank you for your solution. But I still feel weird for a brand new request
being created for a called block (servlet), at least for a super block
(servlet). Having a look at the source code, each new brand request and
response are supposed to be stored in its call frame (actually, this feature
is not implemented yet, but api for retrieving these two objects are
provided). If such design is intended, why not just treat request and
response as part of servlet (block) context. And a way for passing a
request's attributes or parameters must be provided. My real opinion is that
request should be pass through all servlets invoked, instead of creating a
new one.

Rice

On 4/2/07, Alexander Klimetschek <alexander.klimetschek@mindquarry.com>
wrote:
>
> We had the same problem already with the previous block: protocol.
> Currently
> the only way to send parameters to the other servlet via the URL. Thus I
> have written a simple input module that converts your params into URL
> params:
>
> - ParamsToURIModule: (Input Module)
>
> a meta module that converts all attributes of another module into a
> correct
> uri query string (&a=b;c=d)
>
>
> http://www.mindquarry.org/repos/mindquarry-webapp/trunk/mindquarry-webapp-resources/src/main/java/com/mindquarry/webapp/modules/ParamsToURIModule.java
>
>
> To use it, simply write this (if the input module is registered under
> 'params-as-uri':
>
> <map:read src="servlet:super:/{0}?{params-as-uri:request-param}"/>
>
>
> It is a meta input module, ie. it takes the name of another module and
> converts all it's attributes into an URL query string. In this case it
> will
> add all request parameters.
>
> Alex
>
>
> Rice Yeh schrieb:
> > Hi,
> >  I find that all the parameters in a http request get lost when using
> > servlet: in a sitemap like the following:
> >
> > <map:read src="servlet:super:/{0}"/>
> >
> > Any clue?
> >
> > Rice
> >
>
>
> --
> Alexander Klimetschek
> http://www.mindquarry.com
>
>

Mime
View raw message