commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: [chain] questions about various servlet/*Mapper classes
Date Sun, 06 Mar 2005 18:02:32 GMT
>To fix this, let's first consider how a catalog can be retrieved.
>Suppose a command retrieves a catalog from the CatalogFactory (either
>the default one or a named one and this is the case when CONFIG_ATTR
>is not set), now the problem becomes how it knows the catalog name.
>One way is to hard code the catalog name in the command. Another way
>is
>to retrieve the name from the chain context. I think the later one is
>more flexible (especially for a generic command like ServletPathMapper
>command), even though it incurs one more step. (This command has a
>setCatalogKey method, but I'm not sure how this method can be called.
>Since you can't call this method from the containing servlet because
>the servlet only knows about the generic command interface.)

Command methods like "setCatalogKey" are generally intended to be set 
during configuration bootstrap time, for example, by the Digester 
process that reads in an XML file...

<command className="...ServletPathMapper" catalogKey="catalog" />

As for your other comments... to be honest, I've been too busy to 
consider them very carefully, and I think part of my problem is that 
I have never even considered using the ChainServlet classes.  Do you 
have a suggestion for a fix for the code base so that in the next 
release, it will be more practically usable?

Thanks, Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
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