Thanks for that explanation. While I understand the scoping rationale, it seems that dots in the name are just a hack to store scope rather than coming up with a different data structure (hey, thats cool, I do this myself too.... see the Struts Validator tag handler for an example, and documented explanation as well! :).
So looks like some refactoring is in order to get there from here. Ok, I think I get the bean getter lookup stuff too. Smack me if I'm off base.... but configuration parameters are automatically available for things like Struts version by simply providing a getter for it. Right? (lights turning on in my head!). This is now making sense to me. Sorry for being a bit slow up the uptake here. What build file and target(s) are folks running to get unit tests running? I'll write some config param unit tests to assert the current functionality is preserved and to identify the "bug" with dotted syntax that I'm experiencing, and then start refactoring the details. Thanks, Erik Ara Abrahamian wrote: >>Ok, I have more clues. Here's what I'm trying to do: >> >> <deploymentdescriptor validatexml="true" >> destdir="${build.dir}/${site}"> >> <configParam name="web.security.mode" value="basic"/> >> </deploymentdescriptor> >> >>And in web-security.xml I'm using the config parameter to control > > which > >>authentication mode is enabled. BASIC is nice for Cactus tests, but >>sucks for production sites, so thats one of the reasons for doing > > this. > >>I thought perhaps the dots in my parameter name might be causing the >>problem, and sure enough as soon as I changed it to name="security" it >>worked. >> >>Is there a reason we don't allow dots in configuration parameter > > names? > >> I'll have to dig into the code to see where this is happening, but > > it > >>seems unnecessary for us to be stripping the name, right? > > > Yes there is a reason. Config params have scope. You may have a security > param in webdoclet and another one for its deploymentdescriptor subtask, > or another security config param in another subtask. Now let's say you > want to get the value of the security param in your template file. Which > one should be picked? XDoclet searches for the param in the active > subtask, if not found there then search the webdoclet task. To let it > know exactly which one to use you can prefix it with the subtask name: > deploymentdescriptor.security for example, or even > anothersubtask.security. > > But anyway I think first of all ConfigParamHandler should search for the > raw "web.security.mode" param in the active subtask and then try to > search for dots. > > Ara > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Xdoclet-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel