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:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 10:35 PM To: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]