Hi

I just found out that I can't change the forward "Roles List Setup"
directly to listRoles.jsp because the form bean 'rolesForm' is not set yet.
I have to change the UsersTreeBuilder.java to get rid of the additional
Forwarding. It's not necessary to forward afterwards again to listRoles
("Roles List Setup") because the form bean 'rolesForm' is already
instantianted.

I've just changed the forward request parameter.

TreeControlNode groups = new TreeControlNode
            ("Global Administer Groups",
             "Groups.gif",
             resources.getMessage("users.treeBuilder.groupsNode"),
             "users/listGroups.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Groups List"),
             "content",
             false);
        TreeControlNode roles = new TreeControlNode
            ("Global Administer Roles",
             "Roles.gif",
             resources.getMessage("users.treeBuilder.rolesNode"),
             "users/listRoles.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Roles List"),
             "content",
             false);
        TreeControlNode users = new TreeControlNode
            ("Global Administer Users",
             "Users.gif",
             resources.getMessage("users.treeBuilder.usersNode"),
             "users/listUsers.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Users List"),
             "content",
             false);





                                                                                       
                                           
                      Amy Roh                                                          
                                           
                      <[EMAIL PROTECTED]         An:      Tomcat Developers List 
<[EMAIL PROTECTED]>                    
                      rg>                      Kopie:                                  
                                           
                                               Thema:   Re: administration web, 
struts-config.xml                                 
                      30.09.2002 21:41                                                 
                                           
                      Bitte antworten                                                  
                                           
                      an "Tomcat                                                       
                                           
                      Developers List"                                                 
                                           
                                                                                       
                                           
                                                                                       
                                           




Oliver Wulff wrote:
> Hi
>
> I use Tomcat 4.10.
>
> When I want to show the available roles the ListRolesAction has to be
> called. I guess that it will be called twice.
>
> Here is a snippet of org.apache.webapp.admin.users.UsersTreeBuilder:
> ...
> TreeControlNode roles = new TreeControlNode
>             ("Global Administer Roles",
>              "Roles.gif",
>              resources.getMessage("users.treeBuilder.rolesNode"),
>              "users/listRoles.do?databaseName=" +
>              URLEncoder.encode(databaseName) +
>              "&forward=" +
>              URLEncoder.encode("Roles List Setup"),
>              "content",
>              false);
> ...
>
> and a snippet of the struts-config.xml:
> ...
> <forward        name="Roles List"
>                     path="/users/listRoles.jsp"
>                 redirect="false"/>
>
>     <forward        name="Roles List Setup"
>                     path="/users/listRoles.do?forward=Roles+List"
>                 redirect="false"/>
> ...
>
> As you can see from the source code the request will be dispatched to
> "Roles List Setup" which is again listRoles.do.
> Does that make sense?
>
> It still works if I define the "Roles List Setup" like this:
> <forward        name="Roles List Setup"
>                     path="/users/listRoles.jsp"
>                 redirect="false"/>

This is the same as the above "Roles List Setup" definition since
listRoles.do?forward=Roles+List calls listRoles.jsp.  So it doesn't
matter whether you use forward "Roles List" or to call directly
listRoles.jsp since "Roles List" forwards to listRoles.jsp.

Amy

>
>
> Regards
> Oliver
>
>
>
>
>
>
>
> ******************* BITTE BEACHTEN *******************
> Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
> möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
> Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
> genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
> irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
> Ausschluss jeder Reproduktion zu zerstören und die absendende Person
> umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
>
>
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>



--
Amy Roh
Java 2 Enterprise Edition
Java/XML Software
Sun Microsystems, Inc.
[EMAIL PROTECTED]
(408) 276-7262 Direct
(408) 276 7191 Fax



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






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

Reply via email to