commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lin <xuhua....@gmail.com>
Subject [chain] questions about various servlet/*Mapper classes
Date Tue, 01 Mar 2005 21:17:30 GMT
I'm trying to use ChainProcessor and various servlet/*Mapper classes
(like PathInfoMapper, ServletPathMapper etc.)  (version 1.0) and it
seems the following always return null catalog:

Catalog catalog = (Catalog) context.get(getCatalogKey());

If I use CONFIG_ATTR, I need to change this to:

Catalog catalog = (Catalog)
swcontext.getContext().getAttribute(getCatalogKey());

, i.e. getting the catalog from the ServletContext. In this case,
CONFIG_ATTR has to be set to the default value since the CatalogKey is
hard coded as the default value.

If I don't use CONFIG_ATTR, I need to change this to: 

Catalog catalog = (Catalog) request.getAttribute(getCatalogKey());
, i.e to getting the catalog from the request.  Again, the default
catalog key is used and the value for sevlet init parameter
org.apache.commons.chain.CATALOG is not used.

Am I missing something or these are bugs?

Another issue is that CONFIG_CLASS_RESOURCE, CONFIG_WEB_RESOURCE and
RULE_SET are actually context parameters in ChainServlet even though
the javadoc said they are servlet init parameters.

Thanks,

Howard

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message