tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: How do I get context-params that are set in the web.xml file?
Date Fri, 29 Jun 2001 04:39:21 GMT wrote:
> I hope the subject says it all but here's a reiteration.  The sample
> web.xml in TOMCAT_HOME/doc/appdev shows how to set and access
> <context-params>.  The current docs on ServletContext do not seem to
> have a method to get context params.  <init-params> on a per servlet
> basis work as described but I have several values that all servlets must
> access.

e.g. in TC3.x core/ implementation

    public void contextInit(Context ctx) throws TomcatException
        String className = ctx.getInitParameter("RoleMapper");

Would get the following param from webapps/xx/WEB-INF/web.xml



View raw message