Hi,
I'm using Cocoon 2.2 RC2 on top of Tomcat and I had a strange problem
with getInitParameter().
I defined some parameters in Tomcat's context block for my application, eg:
<Parameter
name="my.param"
value="Your param is quite nice"/>
Then, in flow, I got this:
cocoon.context.getInitParameter("my.param") == null
So, I tried this:
var E = cocoon.context.getInitParameterNames();
while( E.hasMoreElements() ) {
var e = E.nextElement();
cocoon.log.error("N: " + e + ']');
cocoon.log.error("V: " + cocoon.context.getInitParameter(e) + ']');
}
And the resulting log lines were:
....
2008-05-15 12:01:47,010 http-8080-2 ERROR fom.FOM_Cocoon - N: my.param]
2008-05-15 12:01:47,011 http-8080-2 ERROR fom.FOM_Cocoon - V: null]
....
So, my.param reached cocoon from the Tomcat Context, but not its value?!
However, if put some servlet:init-params in the servlet:context for my
block, then everything works:
So, if I have:
<servlet:init-params>
<entry key="enable-uploads" value="true" />
<entry key="upload-max-size" value="1000000" />
</servlet:init-params>
in my serlvet-service.xml file, then the above loop gives me:
....
2008-05-15 12:01:47,010 http-8080-2 ERROR fom.FOM_Cocoon - N: my.param]
2008-05-15 12:01:47,011 http-8080-2 ERROR fom.FOM_Cocoon - V: Your Param
is quite nice]
2008-05-15 12:00:56,153 http-8080-2 ERROR fom.FOM_Cocoon - N:
enable-uploads]
2008-05-15 12:00:56,153 http-8080-2 ERROR fom.FOM_Cocoon - V: true]
2008-05-15 12:00:56,153 http-8080-2 ERROR fom.FOM_Cocoon - N:
upload-max-size]
2008-05-15 12:00:56,153 http-8080-2 ERROR fom.FOM_Cocoon - V: 1000000]
....
Not sure if this classifies as a bug, or if I'm confused.
Cheers and Thanks,
Shahriar.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]