cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anna Bikkina <a...@pinksheets.com>
Subject Re: web.xml parameters in cocoon action classes
Date Wed, 28 Apr 2004 15:28:50 GMT
Thank you for the response.

Does any have a different solution for this problem. Everyone must be facing 
this problem.

Thanks in advance,
Anna.


On Wednesday 28 April 2004 04:00 am, Leonid Chumanov wrote:
> I had this problem too.
>
> I had no time to find best solution. My solution is very simple (may be
> it is not the best - ?).
>
> In class MainServlet that is start point of my application
>
> public class MainServlet
>     extends CocoonServlet {
>     public void init() throws ServletException {
>         super.init();
>         String attribute =
> getServletConfig().getInitParameter("myAttrName");
>         if (attribute != null){
>             getServletContext().setAttribute("myAttrName", attribute);
>         }
> }
>
>
> In action I use:
>
> ObjectModelHelper.getContext(objectModel).getAttribute("myAttrName");
>
>
> -----Original Message-----
> From: Anna Bikkina [mailto:anna@pinksheets.com]
> Sent: Tuesday, April 27, 2004 10:35 PM
> To: users@cocoon.apache.org
> Subject: web.xml parameters in cocoon action classes
>
> >Hi,
> >
> >I have a n application which runs on cocoon. I have to get some
>
> parameters
>
> >from web.xml or cocoon.xconf into my action classes and use them there.
>
> I
>
> >tried using
> >ObjectModelHelper.getContext(objectModel).getInitParameter("timelimit")
>
> ;
>
> >but it didnt work. It is returning null. How can I access init
>
> parameters in
>
> >cocoon whcih are specified in web.xml
>
> ---------------------------------------------------------------------
> 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