PROBLEM: When I log on to Tomcat Administration page there is a tree on the left frame. However when you click on the any branch that is expandable/collapsable, there is no action. All the icons have the same URL: http://localhost:8080/admin/treeControlTest.do?tree= with no node name. It could be because the some Java servlet (possibly, SetUpTreeAction.class) that prepares the tree. TEMPORARY SOLUTION: My workaround was to steal the node names from the links that were next to the expanding/collapsing icon and craft the correct URL. For example, for a "Service (Catalina)" branch there is a link: http://localhost:8080/admin/EditService.do? select=Catalina:type=Service,serviceName=Catalina&nodeLabel=Service+(Catalina). It seemed like the first parameter is a tree node name, so I crafted the link in the address bar: http://localhost:8080/admin/treeControlTest.do? tree=Catalina:type=Service,serviceName=Catalina and that branch has expanded. Using that link once again collapses the branch.
Almost forgot - JDK 1.4.2
Same problem with JDK 1.5.0-b64
This works for me. Can you actually be more convincing ?
Well, how can I be more convincing? I can see the same symptom as Michael who originated the bug report, but how to prove that? The only one thing I can think to is to attach the source code of the faulty left frame of the admin module (see bug report attachements) which shows the incomplete tree expand/collapse url as described by Michael. The config here is : - Sun Sparc machine - Solaris 8 - Java is 1.5.0-b64 The problem occurs when using the admin package downloaded at the same time as Tomcat 5.5.4 Everything is working as a charm using Tomcat 5.0.28.
Created attachment 13612 [details] Source code of the faulty frame
The issue here is that it works for me. What I meant is: you're not doing anything which convinces me the issue is not that you didn't install things correctly. Besides, your attached code doesn't look so bad. So please do not waste time reopening the report.
i can also reproduce this issue in a fresh 5.5.4 download and 5.5.4 admin download running Java 5.0. entering admin app is fine having added credentials to tomcat-users and you _can_ click the nodes with the o- icons to load the right hand side but you _cannot_ collapse or uncollapse the branch on the left. Logging when clicking a collapsable icon is Dec 1, 2004 4:30:53 PM org.apache.catalina.core.ApplicationContext log INFO: action: Entered TreeControlTestAction:perform() Dec 1, 2004 4:30:53 PM org.apache.catalina.core.ApplicationContext log INFO: action: Tree expand/contract on
The problem I described appeared while using: Solaris 2.6 Tomcat 5.5.4 + Admin 5.5.4 JDK 1.4.2 We experience the same problem with the following configuration: Windows XP Tomcat 5.5.4 + Admin 5.5.4 JDK 1.5 Remy, please let me know what proofs do you need to convict you that this is a problem. The file that Michel have attached shows that all expandable/collapsable nodes point to: http://nova:8080/admin/treeControlTest.do?tree= which is the source of the problem.
it does appear to be that the tree attribute is not being output for treeControl <attribute> <name>tree</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <description> Name of the attribute (in the scope specified by the "scope" attribute, if any) under which an object of type org.apache.webapp.admin.TreeControl is stored. This object represents the entire current state of the tree, including a representation of the hierarchical representation of the nodes, plus the current expanded/ or contracted state of non-leaf nodes. </description> </attribute> i've rooted around in the code, but don't have further time _right_ now. There is a parameter in the JSP ${name} that should indicate the node's name but it is empty In the tag code this value is replaced with an encoded version of the node's name. node is passed in from looking for a TreeControlNode in a scope, but that's as far as I got currently. Maybe Amy would have a better idea (I see she fixed a Struts problem yesterday on admin webapp) // HACK to take into account special characters like = and & // in the node name, could remove this code if encode URL // and later request.getParameter() could deal with = and & // character in parameter values. String encodedNodeName = URLEncoder.encode(node.getName (),TomcatTreeBuilder.URL_ENCODING);
to view in isolation just request http://server:8080/admin/treeControlTest.do from Tomcat 5.5.4 installation and click on any of the collapse icons (note these have different URLs to the text labels which may be why remy thought this worked??)
Ok, I retested this, and this doesn't work anymore. Sorry for the trouble.
I knew that changing admin to be a 2.4 webapp was a bad idea :(.
Created attachment 13619 [details] changes the placeholder lookup key for node to collapse to match new jsp version fix for org.apache.webapp.admin.TreeControlTag
Created attachment 13620 [details] changes the tree placeholder key in JSP to non-EL value fix for admin/tree-control-test.jsp
this bug was a result of moving to the 2.4 spec. the placeholder used in the tree control tag was ${name} which tomcat will have tried to evaluate as a page scoped expression language variable (which does not exist of course as this is not the intention). i have provided patches for the affected JSP and Java files that removes the dollar but leaves the braces so it still looks like a placeholder. i have also grepped all files across the admin webapp to ensure there are no more similar bugs involving EL type syntax placeholders and there are not (only ${node} but this is in comments only and is not present in code anywhere. i have compiled and tested with the latest HEAD and the node collapse works ok. hope this makes it for 5.5.5 tomorrow. cheers :)
Fixed also on the TOMCAT_5_0 branch, for 5.0.31.