You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Afkham Azeez <af...@gmail.com> on 2010/06/15 16:37:02 UTC

Embedded Tomcat - programatically adding context-params

Hi folks,
We are using Embedded Tomcat in our products. Once we create a new context,
we need to set some context parameters. How can this be done?

I've tried using org.apache.catalina.Context#addParameter, but from within a
JSP, when I try to access this parameter as
application.getInitParameter("name) I'm getting null.

Thanks
Azeez

Re: Embedded Tomcat - programatically adding context-params

Posted by Afkham Azeez <af...@gmail.com>.
Sorted this out.

You need to set the params after the context is added to the host. I was
setting it before adding it to the host.

Thanks
Azeez

On Tue, Jun 15, 2010 at 8:07 PM, Afkham Azeez <af...@gmail.com> wrote:

> Hi folks,
> We are using Embedded Tomcat in our products. Once we create a new context,
> we need to set some context parameters. How can this be done?
>
> I've tried using org.apache.catalina.Context#addParameter, but from within
> a JSP, when I try to access this parameter as
> application.getInitParameter("name) I'm getting null.
>
> Thanks
> Azeez
>



-- 
Afkham Azeez
Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
email: azeez@wso2.com cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware