You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tito Eritja <ex...@e-inventa.net> on 2004/08/06 12:23:17 UTC
mapping an action twice with Xdoclet
Hi all.
I have to map the same Action twice, is possible to do it with Xdoclet
in the same java file? (by now, I write the first mapping with
@struts.action and the second with merge file struts-action.xml
thanks
tito
RE: mapping an action twice with Xdoclet
Posted by Tito Eritja <ex...@e-inventa.net>.
Hi David
Sorry... I haven't explained myself well... Xdoclet writes the two
action in config file, but the problem comes with
@struts.action-forward and @struts.action-exception, as Xdoclet writes
the forward and the exception in each action.
if I write something like that:
* @struts.action
* name="adminUsersForm"
* path="/loadAdminUsersForm"
* parameter="load"
* validate="false"
*
* @struts.action-exception
* type="net.inventa.online.model.user.exception.UserManagerException"
* key="userRegistration.userManager.exception"
* path="/userRegistrationException.jsp"
*
* @struts.action-forward
* name="success"
* path="/adminUsersForm.jsp"
*
* @struts.action
* name="adminUsersForm"
* path="/submitAdminUsersForm"
* parameter="submit"
*
* @struts.action-forward
* name="success"
* path="/loadAdminUsersForm.do"
*
*/
public class AdminUsersAction extends Action {
[...]
it generates this xml file
<action
path="/loadAdminUsersForm"
type="net.inventa.online.controller.action.AdminUsersAction"
name="adminUsersForm"
scope="request"
parameter="load"
unknown="false"
validate="false"
>
<exception
key="userRegistration.userManager.exception"
type="net.inventa.online.model.user.exception.UserManagerException"
path="/userRegistrationException.jsp"
/>
<forward
name="success"
path="/adminUsersForm.jsp"
redirect="false"
/>
<forward
name="success"
path="/loadAdminUsersForm.do"
redirect="false"
/>
</action>
<action
path="/submitAdminUsersForm"
type="net.inventa.online.controller.action.AdminUsersAction"
name="adminUsersForm"
scope="request"
parameter="submit"
unknown="false"
validate="true"
>
<exception
key="userRegistration.userManager.exception"
type="net.inventa.online.model.user.exception.UserManagerException"
path="/userRegistrationException.jsp"
/>
<forward
name="success"
path="/adminUsersForm.jsp"
redirect="false"
/>
<forward
name="success"
path="/loadAdminUsersForm.do"
redirect="false"
/>
</action>
And this is not what I was expecting ;o( What I'm doing wrong?)
thanks for your time
tito
El vie, 06 de 08 de 2004 a las 15:24, David Friedman escribió:
> I believe I've put two @struts.action declarations in one Java file for
> XDoclet and it put two <action ... /> entries in my struts-config.xml file.
> (Under eclipse/Xdoclet). If it helps, I updated the plug-in jars for the
> latest stable version in the Eclipse XDoclet folders (they were a version or
> two behind).
>
> Regards,
> David
>
> -----Original Message-----
> From: Tito Eritja [mailto:extlists@e-inventa.net]
> Sent: Friday, August 06, 2004 6:23 AM
> To: struts
> Subject: mapping an action twice with Xdoclet
>
>
> Hi all.
>
> I have to map the same Action twice, is possible to do it with Xdoclet
> in the same java file? (by now, I write the first mapping with
> @struts.action and the second with merge file struts-action.xml
>
> thanks
>
>
> tito
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: mapping an action twice with Xdoclet
Posted by David Friedman <hu...@ix.netcom.com>.
I believe I've put two @struts.action declarations in one Java file for
XDoclet and it put two <action ... /> entries in my struts-config.xml file.
(Under eclipse/Xdoclet). If it helps, I updated the plug-in jars for the
latest stable version in the Eclipse XDoclet folders (they were a version or
two behind).
Regards,
David
-----Original Message-----
From: Tito Eritja [mailto:extlists@e-inventa.net]
Sent: Friday, August 06, 2004 6:23 AM
To: struts
Subject: mapping an action twice with Xdoclet
Hi all.
I have to map the same Action twice, is possible to do it with Xdoclet
in the same java file? (by now, I write the first mapping with
@struts.action and the second with merge file struts-action.xml
thanks
tito
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org