Hi,
I'm using xdoclet 1.2, and struts 1.1.
I'm generating struts-config.xml with xdoclet, and am hitting a few
snags - here's the latest:
I want my action-mappings tag to look like this:
<action-mappings type="org.apache.struts.config.SecureActionConfig">
So the question is how to get the type parameter set from xdoclet.
I see in the struts_config_xml.xdt
<XDtConfig:ifConfigParamNotEquals paramName="Controller" value="">
<action-mappings type="<XDtConfig:configParameterValue
paramName="Controller"/>">
</XDtConfig:ifConfigParamNotEquals>
<XDtConfig:ifConfigParamEquals paramName="Controller" value="">
<action-mappings>
</XDtConfig:ifConfigParamEquals>
& I read
Using configuration parameters
Templates are normally driven by XDoclet attributes embedded in source
files. However,
XDoclet also includes a mechanism to provide attributes at runtime in
the form
of configuration parameters. Configuration parameters are name/value
pairs that are
specified using the <configParam> subelement of the <template> subtask:
<template templateFile="..." destinationfile="...">
<configParam name="arraysize" value="110" />
</template>
Configuration parameters can be queried with the
<XDtConfig:configParameter-
Value> tag:
ArrayList list = new ArrayList(<XDtConfig:configParameterValue
paramName="arraysize" />);
XDoclet provides several conditional block tags to test the presence and
values of
configuration parameters. The parameter name to be tested is given in
the
paramName attribute. If a value is needed for comparison, it can be
passed in the
value attribute.
That's fine, but I'd rather not use the template tag if I don't have to.
I tried this:
<strutsconfigxml version="1.1">
<configParameter name="Controller"
value="org.apache.struts.config.SecureActionConfig"/>
</strutsconfigxml>
but the build failed with this:
build.xml:173: Class
xdoclet.modules.apache.struts.StrutsConfigXmlSubTask doesn't support the
nested "configparameter" element.
(Don't know why the capitalization is different).
However I can't see the point in using the XDtConfig tag in
_config_xml.xdt that is in the distribution
xdoclet-apache-module-1.2.jar, if it can't be used in situ.
Guess I'll have to try template after all.
Any one got advice on this?
Thanks
Martin
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user