Bug 51156 - "Expire sessions" button not visible for context configured in server.xml
Summary: "Expire sessions" button not visible for context configured in server.xml
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Manager application (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 00:30 UTC by kubak
Modified: 2011-05-10 08:51 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.