You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <ma...@reumann.net> on 2002/07/15 16:41:41 UTC

How to tell what dispatch methods are called in config.xml ?

For this app I'm working on I've set it up where I only have one
Action class which extends DispatchAction. One thing I'm noticing as
this app develops is that it can be a bit confusing keeping track of
what method in the action class is called by simply looking at the
struts-config.xml file. I'm wondering how most of you handle this.

As it is I'm doing two things that seem to help.

If the action mapping is only used by the input from one page. I
try to name the action mapping the same as what the dispatch parameter
would be. I also add in the comments what dispatch parameters could go
with this mapping. I'm curious if other people have suggestions?

Thanks

For example:

<!-- directs to page where you can select to edit a user
     selected from display
     dispatch= viewUser
-->
<action path="/viewUser"
    type="corporate.userAdmin.UserAdminAction"
    name="userForm"
    scope="request"
    validate="false"
    parameter="dispatch"
    input="/displayUsers.jsp">
        <forward 
            name="success"
            path="/WEB-INF/jsp/userAdmin/viewUser.jsp"/>
</action>

-- 

Rick
mailto:maillist@reumann.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>