You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Damm, Gary" <ga...@qualcomm.com> on 2003/12/15 23:15:03 UTC
generating struts-config.xml using xdoclet
I have two action tags defined in a single action class. Each action
has it's own action-forward element. When the struts-config.xml is
generated it generates two action elements but each action element has
both action forwards (each should only have one).
/**
* @struts.action
* path="/HomeLink"
*
* @struts.action-forward
* name="success"
* path="/UserSearch.jsp"
*
* @struts.action
* path="/UserCreateLink"
*
* @struts.action-forward
* name="success"
* path="/UserCreate.jsp"
*
*/
generates this:
<action
path="/HomeLink"
type="foo.bar.SuccessAction"
unknown="false"
validate="true"
>
<forward
name="success"
path="/UserSearch.jsp"
redirect="false"
/>
<forward
name="success"
path="/UserCreate.jsp"
redirect="false"
/>
</action>
<action
path="/UserCreateLink"
type="foo.bar.SuccessAction"
unknown="false"
validate="true"
>
<forward
name="success"
path="/UserSearch.jsp"
redirect="false"
/>
<forward
name="success"
path="/UserCreate.jsp"
redirect="false"
/>
</action>
but I want this:
<action
path="/HomeLink"
type="com.qualcomm.bds.usermgr.web.action.SuccessAction"
unknown="false"
validate="true"
>
<forward
name="success"
path="/UserSearch.jsp"
redirect="false"
/>
</action>
<action
path="/UserCreateLink"
type="com.qualcomm.bds.usermgr.web.action.SuccessAction"
unknown="false"
validate="true"
>
<forward
name="success"
path="/UserCreate.jsp"
redirect="false"
/>
</action>
Is there a way to identify that a forward tag belongs with a specific
action so when the struts-config.xml is generated each action element
only has a single forward associated with it?
Thanks in advance,
Gary
Re: generating struts-config.xml using xdoclet
Posted by Haroon Rafique <ha...@utoronto.ca>.
On Yesterday at 2:15pm, DG=>Damm, Gary <ga...@qualcomm.com> wrote:
DG> I have two action tags defined in a single action class. Each action
DG> has it's own action-forward element. When the struts-config.xml is
DG> generated it generates two action elements but each action element has
DG> both action forwards (each should only have one).
DG>
Gary,
Sorry I can't give you a very helpful answer, but just wanted to let you
know that I have found that xdoclet behaves the same way for me as well.
For now, I've been cognizant of this short-coming and, so far, have not
run into a situation where it has become a problem for me.
You might want to take a look at:
http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-715
which has an exaplanation and a work-around for your exact problem (not
tested by me).
Cheers,
--
Haroon Rafique
<ha...@utoronto.ca>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org