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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to