You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rick Tessner <ri...@dingle.myra.com> on 2001/08/03 21:05:14 UTC

[C2] How to get web.xml parameters in an XSP ... ?

Hello all,

Is there any way to grab the <init-param> parameters defined in the web.xml
via an XSP?  Or is this be considered a big no-no?

-- 
Rick Tessner	rick@myra.com
MYRA Systems Corp. Fone: (250) 381 1335 x125  Phax: (250) 381 1304
                   Cell: (250) 885 9452

"Time grabs you by the wrist, directs you where to go.
 So make the best of this test and don't ask why.'


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] How to get web.xml parameters in an XSP ... ?

Posted by Peter Royal <pr...@managingpartners.com>.
At 12:05 PM 8/3/2001 -0700, Rick Tessner wrote:
>Is there any way to grab the <init-param> parameters defined in the web.xml
>via an XSP?  Or is this be considered a big no-no?

There is not a way currently, but you could do it if you wanted to dig a bit :)

Those parameters are read in the CocoonServlet class 
(org.apache.cocoon.servlet package). Values in there are stuffed into the 
Context (an avalon context, not servlet).

You could modify that class to put those parameters into the Context, but 
then you have to get them out. AFAIK an XSP page is not Contextualizable 
(an Avalon interface). You could give it that by modifying the styleshete 
used to create the compiled XSP forms.

So yes, its possible, but it would take some legwork. It might be nice to 
have a generic way to pass parameters to an instance of cocoon via web.xml, 
maybe via the context. I'm sure if you wrote that the developers would 
consider the patch.
-pete

-- 
peter royal -> proyal@managingpartners.com
managing partners, inc. -> http://www.managingpartners.com


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>