Lai, Harry wrote:

>Hi Yury,
>
>Within the act method, you can access the cocoon ServletContext via the
>objectModel parameter.  Just use the constants in
>org.apache.cocoon.Constants.  For example:
>
>       Context cocoonServContext = (Context)
>objectModel.get(Constants.CONTEXT_OBJECT);
>
>Note that this is the Cocoon context wrapper (defined in
>org.apache.cocoon.environment) for the actual HTTP Servlet Context.  If you
>need the actual HTTP Servlet Context (defined in javax.servlet), you can use
>the constants defined in org.apache.cocoon.environment.http.HttpEnvironment.
>For example:
>
>       ServletContext servContext = (ServletContext)
>objectModel.get(HttpEnvironment.HTTP_SERVLET_CONTEXT);
>
ServletContext servContext = (ServletContext)
objectModel.get(HttpEnvironment.HTTP_SERVLET_CONTEXT);

HttpEnviroment... Thats Ok with me :)
Thanx Harry!

>
>Hope that helps!
>
>Harry
>
>
>-----Original Message-----
>From: yuryx [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 01, 2002 10:32 AM
>To: [EMAIL PROTECTED]
>Subject: cocoons ServletContext
>
>
>Hi all!
>
>Can anyone help me with the following problem:
>How can I get into my cocoon's 'action' a pointer to cocoon ServletContext?
>Is it possible? What shall I use in my 'action'?
>
>Thanx.
>Yury.
>
>
>
>---------------------------------------------------------------------
>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: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>---------------------------------------------------------------------
>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: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]>
>




---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to