Bug 51156

Summary: "Expire sessions" button not visible for context configured in server.xml
Product: Tomcat 6 Reporter: kubak <jakub>
Component: Manager applicationAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: jakub
Priority: P2    
Version: unspecified   
Target Milestone: default   
Hardware: All   
OS: All   

Description kubak 2011-05-06 00:30:54 UTC
If app is configured in server.xml like this:

{code}
  <Host name="www.myapp.pl" appBase="/usr/lib/tomcat/webapps"
                unpackWARs="false" autoDeploy="false"
              xmlValidation="false" xmlNamespaceAware="false"  >
     <Context docBase="/var/www/myapp" path="" cacheMaxSize="5120"
cacheTTL="60000" cachingAllowed="true" >
     </Context>
     <Context path="/manager"  privileged="true"
docBase="/usr/lib/tomcat/webapps/manager">
     </Context>
</Host>
{code}

In Tomcat Manager, on the application list, there is a button "Expire
sessions"  available only for "/manager" application.
There is no button "Expire sessions" for "/" path.

I think bug is in HTMLManagerServlet.java in this part:

{code}

                if (context.getPath().equals(this.context.getPath())) {
                    writer.print(MessageFormat.format(
                        MANAGER_APP_ROW_BUTTON_SECTION, args));
                } else if (context.getAvailable() && isDeployed) {
                    writer.print(MessageFormat.format(
                        STARTED_DEPLOYED_APPS_ROW_BUTTON_SECTION, args));
                } else if (context.getAvailable() && !isDeployed) {
                    writer.print(MessageFormat.format(
                        STARTED_NONDEPLOYED_APPS_ROW_BUTTON_SECTION, args));
                } else if (!context.getAvailable() && isDeployed) {
                    writer.print(MessageFormat.format(
                        STOPPED_DEPLOYED_APPS_ROW_BUTTON_SECTION, args));
                } else {
                    writer.print(MessageFormat.format(
                        STOPPED_NONDEPLOYED_APPS_ROW_BUTTON_SECTION, args));
                }
{code}
Comment 1 Mark Thomas 2011-05-06 09:24:42 UTC
Thanks for the report.

This has been fixed in 7.0.x and will be included in 7.0.13 onwards.

The fix has also been proposed for 6.0.x.
Comment 2 Mark Thomas 2011-05-10 08:51:13 UTC
Fixed in 6.0.x and will be included in 6.0.33 onwards.