Hi all,

I've just started using Struts 2.21 and I've wired up an action with
RESTfulish way of calling different methods:

<action name="CreatePortalUser/*"
class="com.msi.struts.action.internal.CreatePortalUserAction" method="{1}">
            <result
name="none">/WEB-INF/jsp/internal/createPortalUserHome.jsp</result>
            <result
name="newUserPage">/WEB-INF/jsp/internal/createUser.jsp</result>
            <result
name="newCustomerPage">/WEB-INF/jsp/internal/createCustomer.jsp</result>
 </action>

so I can process CreatePortalUser/newUserPage or
CreatePortalUser/newCustomerPage within the same action.

I'm struggling to do separate validation for each method using this approach
though. I think I need a file called
CreatePortalUser-"methodname"-validation.xml for each method, where
"methodname" equals "CreatePortalUser/newUserPage" or "
CreatePortalUser/newCustomerPage". But obviously, I can't include a /
(slash) in the xml's file name. Is there a work around for this? I took a
look at using the Validation annotation on my action class, but it is
deprecated?

Cheers,

-- 
Eddy Seager

Reply via email to