cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Hrivik" <hri...@isdd.sk>
Subject RE: RequestParameterModule
Date Fri, 28 Nov 2003 08:21:31 GMT

I think that some of web containers implement the
request.getPatameter("myparam");
to return an empty string if parameter is not in request.

I tested it on Oracle OC4J and it returns null.
I think that this is not good.
Imagine you have a pipeline and you want to pass
A request parameter to transformation.
But this parameter is optional and not required.

When I do request-param:myparam
and there is no such parameter in querystring - than I've got an
NullPointerException

I did my own request-param input module which solve this
and it will return an empty string.

Roman



-----Původní zpráva-----
Od: Christian Haul [mailto:haul@informatik.tu-darmstadt.de] 
Odesláno: 27. novembra 2003 20:20
Komu: users@cocoon.apache.org
Předmět: Re: RequestParameterModule

Roman Hrivik wrote:
> This can be reported as bug, I think.
> 
> When I try to access for parameter from request in sitemap and in
> request is not such parameter I'll get null-exception.
> 
> I think that RequestParameterModule should return always not null
value.

Nope since "" is different from null eg on database updates. If there is
a null pointer exception inside the sitemap engine, this is an error
since it should expect null values from an input module and replace it
with "". Could you provide a test case for this that shows the error?
(A short test of mine didn't reveal any problems.)

	Chris.


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




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


Mime
View raw message