cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuryx <yu...@mobicomk.donpac.ru>
Subject Re: cocoons ServletContext
Date Fri, 01 Mar 2002 16:52:38 GMT

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:yuryx@mobicomk.donpac.ru]
>Sent: Friday, March 01, 2002 10:32 AM
>To: cocoon-users@xml.apache.org
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>




---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message