You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2011/10/13 00:49:30 UTC
svn commit: r1182608 - in /tomcat/maven-plugin/trunk: ./
common-tomcat-maven-plugin/
common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/
tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/
tomcat6-maven-plugin/ to...
Author: olamy
Date: Wed Oct 12 22:49:28 2011
New Revision: 1182608
URL: http://svn.apache.org/viewvc?rev=1182608&view=rev
Log:
it test for deploying on a running now works for tomcat6
Added:
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/add.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/asf-logo.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/code.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/design.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/docs.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/fix.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/tomcat.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/update.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/void.gif
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd (with props)
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl (with props)
Modified:
tomcat/maven-plugin/trunk/README.txt
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/pom.xml
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
tomcat/maven-plugin/trunk/pom.xml
tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/AbstractDeployWarProjectIT.java
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/pom.xml
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ShutdownMojo.java
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/java/org/codehaus/mojo/tomcat/it/Tomcat6DeployWarProjectIT.java
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml
tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
Modified: tomcat/maven-plugin/trunk/README.txt
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/README.txt?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/README.txt (original)
+++ tomcat/maven-plugin/trunk/README.txt Wed Oct 12 22:49:28 2011
@@ -1,6 +1,6 @@
to build this project you must Apache Maven at least 2.2.1 .
mvn clean install will install the mojos without running integration tests.
-As there are some hardcoded integration tests with http port 1973 and ajp 2001, you could have some port allocation issues (if you don't know why those values ask olamy :-) )
+As there are some hardcoded integration tests with http port 1973, ajp 2001 and 2008, you could have some port allocation issues (if you don't know why those values ask olamy :-) )
mvn clean install -Prun-its will run integration tests too: to override the default used htpp port you can use -Dits.http.port= -Dits.ajp.port=
To deploy a snaphot version to http://people.apache.org/repo/m2-snapshot-repository/ (which is proxying by https://repository.apache.org/content/groups/snapshots-group/) you must run : mvn clean deploy .
Note you need some configuration in ~/.m2/settings.xml:
Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/pom.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/pom.xml (original)
+++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/pom.xml Wed Oct 12 22:49:28 2011
@@ -62,8 +62,8 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
- <artifactId>catalina</artifactId>
- <version>6.0.33</version>
+ <artifactId>tomcat-catalina</artifactId>
+ <version>7.0.22</version>
<scope>provided</scope>
</dependency>
Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java (original)
+++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java Wed Oct 12 22:49:28 2011
@@ -114,6 +114,7 @@ public class DefaultClassLoaderEntriesCa
try
{
tmpDir = Files.createTempDir();
+ tmpDir.deleteOnExit();
File warFile = artifact.getFile();
UnArchiver unArchiver = archiverManager.getUnArchiver( "jar" );
unArchiver.setSourceFile( warFile );
Modified: tomcat/maven-plugin/trunk/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/pom.xml (original)
+++ tomcat/maven-plugin/trunk/pom.xml Wed Oct 12 22:49:28 2011
@@ -59,6 +59,8 @@
<its.http.port>1973</its.http.port>
<!-- ajp port used to run it test -->
<its.ajp.port>2001</its.ajp.port>
+ <!-- server port for it tests -->
+ <its.server.port>2008</its.server.port>
</properties>
<prerequisites>
Modified: tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/AbstractDeployWarProjectIT.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/AbstractDeployWarProjectIT.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/AbstractDeployWarProjectIT.java (original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-plugin-it/src/main/java/org/codehaus/mojo/tomcat/it/AbstractDeployWarProjectIT.java Wed Oct 12 22:49:28 2011
@@ -42,7 +42,7 @@ public abstract class AbstractDeployWarP
@Override
protected String getWebappUrl()
{
- return "http://localhost:" + getHttpItPort() + "/";
+ return "http://localhost:" + getHttpItPort() + "/foo/";
}
@Override
@@ -56,7 +56,7 @@ public abstract class AbstractDeployWarP
throws Exception
{
final String responseBody = executeVerifyWithGet();
- assertNotNull( "Received message body must not be null.", responseBody );
+ assertNotNull("Received message body must not be null.", responseBody);
assertContains( "Response must match expected content.", "It works !!", responseBody );
assertTrue( "Tomcat folder should exist in target folder of project at " + webappHome,
@@ -65,4 +65,9 @@ public abstract class AbstractDeployWarP
verifier.verifyErrorFreeLog();
}
+ @Override
+ protected int getTimeout()
+ {
+ return 40000;
+ }
}
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/pom.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/pom.xml Wed Oct 12 22:49:28 2011
@@ -172,6 +172,20 @@
<filtering>true</filtering>
</testResource>
</testResources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <nonFilteredFileExtensions>
+ <nonFilteredFileExtensions>war</nonFilteredFileExtensions>
+ </nonFilteredFileExtensions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java Wed Oct 12 22:49:28 2011
@@ -310,6 +310,13 @@ public abstract class AbstractRunMojo
*/
private File tomcatUsers;
+ /**
+ * to install a manager in your embeded tomcat
+ * @parameter
+ * @since 2.0
+ */
+ private File managerWarPath;
+
// ----------------------------------------------------------------------
// Fields
// ----------------------------------------------------------------------
@@ -547,6 +554,7 @@ public abstract class AbstractRunMojo
confDir.mkdir( );
copyFile( "/conf/tomcat-users.xml", new File( confDir, "tomcat-users.xml" ) );
+
if ( tomcatWebXml != null )
{
if ( !tomcatWebXml.exists( ) )
@@ -567,6 +575,10 @@ public abstract class AbstractRunMojo
File webappsDir = new File( configurationDir, "webapps" );
webappsDir.mkdir( );
+ if ( managerWarPath != null && managerWarPath.exists() )
+ {
+ FileUtils.copyFileToDirectory( managerWarPath, webappsDir );
+ }
if ( additionalConfigFilesDir != null && additionalConfigFilesDir.exists( ) )
{
@@ -633,6 +645,15 @@ public abstract class AbstractRunMojo
setupSystemProperties( );
System.setProperty( "catalina.base", configurationDir.getAbsolutePath( ) );
+ System.setProperty( "catalina.home", configurationDir.getAbsolutePath( ) );
+
+ File catalinaPolicy = new File( configurationDir, "conf/catalina.policy" );
+
+ if (catalinaPolicy.exists())
+ {
+ // FIXME restore previous value ?
+ System.setProperty( "java.security.policy", catalinaPolicy.getAbsolutePath() ) ;
+ }
final Embedded container;
if ( serverXml != null )
@@ -644,8 +665,9 @@ public abstract class AbstractRunMojo
container = new Catalina( );
container.setCatalinaHome( configurationDir.getAbsolutePath( ) );
+ container.setCatalinaBase( configurationDir.getAbsolutePath() );
( (Catalina) container ).setConfigFile( serverXml.getPath( ) );
- //( (Catalina) container ).setRedirectStreams( true );
+ ( (Catalina) container ).setRedirectStreams( true );
( (Catalina) container ).setUseNaming( this.useNaming );
container.start( );
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java Wed Oct 12 22:49:28 2011
@@ -202,6 +202,7 @@ public class RunMojo
try
{
temporaryContextFile = File.createTempFile("tomcat-maven-plugin", "temp-ctx-file");
+ temporaryContextFile.deleteOnExit();
fw = new FileWriter(temporaryContextFile);
// format to modify/create <Context backgroundProcessorDelay="5" reloadable="false">
if ( contextFile != null && contextFile.exists() )
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ShutdownMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ShutdownMojo.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ShutdownMojo.java (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ShutdownMojo.java Wed Oct 12 22:49:28 2011
@@ -42,6 +42,15 @@ import org.apache.tomcat.maven.common.ru
public class ShutdownMojo
extends AbstractI18NTomcat6Mojo
{
+
+ /**
+ * Ignore error when shutdown
+ *
+ * @parameter expression="${maven.tomcat.skipErrorOnShutdown}" default-value="false"
+ * @since 2.0
+ */
+ protected boolean skipErrorOnShutdown;
+
/**
* Shuts down all embedded tomcats which got started up to now.
*
@@ -56,7 +65,10 @@ public class ShutdownMojo
}
catch ( Exception e )
{
- throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e );
+ if (!skipErrorOnShutdown)
+ {
+ throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e );
+ }
}
}
}
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/java/org/codehaus/mojo/tomcat/it/Tomcat6DeployWarProjectIT.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/java/org/codehaus/mojo/tomcat/it/Tomcat6DeployWarProjectIT.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/java/org/codehaus/mojo/tomcat/it/Tomcat6DeployWarProjectIT.java (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/java/org/codehaus/mojo/tomcat/it/Tomcat6DeployWarProjectIT.java Wed Oct 12 22:49:28 2011
@@ -26,9 +26,4 @@ public class Tomcat6DeployWarProjectIT
{
// no op
- public void testIt( )
- throws Exception
- {
- //FIXME currently this it fail
- }
}
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/pom.xml Wed Oct 12 22:49:28 2011
@@ -61,25 +61,24 @@
<execution>
<id>tomcat-run</id>
<goals>
- <goal>run</goal>
+ <goal>run-war-only</goal>
</goals>
- <phase>test</phase>
+ <phase>pre-integration-test</phase>
<configuration>
- <port>${its.http.port}</port>
<fork>true</fork>
- <path>/</path>
+ <path>/foo</path>
+ <serverXml>src/main/tomcatconf/server.xml</serverXml>
<tomcatUsers>src/main/tomcatconf/tomcat-users.xml</tomcatUsers>
</configuration>
</execution>
<execution>
<id>tomcat-deploy</id>
- <phase>package</phase>
+ <phase>integration-test</phase>
<goals>
- <goal>deploy-only</goal>
+ <goal>deploy</goal>
</goals>
<configuration>
- <port>${its.http.port}</port>
- <warFile>./simple-war-project-1.0-SNAPSHOT.war</warFile>
+ <url>http://localhost:${its.http.port}/manager</url>
<username>tomcat</username>
<password>tomcat</password>
<path>/foo</path>
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml Wed Oct 12 22:49:28 2011
@@ -17,7 +17,7 @@
under the License.
-->
-<Server port="8010" shutdown="SHUTDOWN">
+<Server port="${its.server.port}" shutdown="SHUTDOWN">
<GlobalNamingResources>
<!-- Used by Manager webapp -->
@@ -29,14 +29,15 @@
</GlobalNamingResources>
<Service name="Catalina">
- <Connector port="8080" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
- <Connector port="8088" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+ <Connector port="${its.http.port}" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
<Engine name="Catalina" defaultHost="localhost">
- <Valve className="org.apache.catalina.valves.AccessLogValve"
- resolveHosts="false" pattern="%t-ip:%a-protocol:%H-localPort:%p-path:%U-time:%D ms"/>
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ resolveHosts="false" pattern="%t-ip:%a-protocol::%H-status:%s-localPort:%p-path:%U-time:%D ms" buffered="false"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />
- <Host name="localhost" appBase="webapps" />
+ <Host name="localhost" appBase="${project.build.directory}/test-classes/deploy-war-project/target/tomcat/webapps">
+ <Context path="/manager" privileged="true" docBase="${project.build.directory}/test-classes/deploy-war-project/src/manager"/>
+ </Host>
</Engine>
</Service>
Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml (original)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml Wed Oct 12 22:49:28 2011
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,7 +18,6 @@
under the License.
-->
-<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp Wed Oct 12 22:49:28 2011
@@ -0,0 +1,84 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%
+ response.setHeader("WWW-Authenticate", "Basic realm=\"Tomcat Manager Application\"");
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>401 Unauthorized</title>
+ <style type="text/css">
+ <!--
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+ H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ PRE, TT {border: 1px dotted #525D76}
+ A {color : black;}A.name {color : black;}
+ -->
+ </style>
+ </head>
+ <body>
+ <h1>401 Unauthorized</h1>
+ <p>
+ You are not authorized to view this page. If you have not changed
+ any configuration files, please examine the file
+ <tt>conf/tomcat-users.xml</tt> in your installation. That
+ file must contain the credentials to let you use this webapp.
+ </p>
+ <p>
+ For example, to add the <tt>manager-gui</tt> role to a user named
+ <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+ config file listed above.
+ </p>
+<pre>
+<role rolename="manager-gui"/>
+<user username="tomcat" password="s3cret" roles="manager-gui"/>
+</pre>
+ <p>
+ Note that for Tomcat 6.0.30 onwards, the roles required to use the manager
+ application were changed from the single <tt>manager</tt> role to the
+ following four roles. You will need to assign the role(s) required for
+ the functionality you wish to access.
+ </p>
+ <ul>
+ <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
+ pages</li>
+ <li><tt>manager-script</tt> - allows access to the text interface and the
+ status pages</li>
+ <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
+ pages</li>
+ <li><tt>manager-status</tt> - allows access to the status pages only</li>
+ </ul>
+ <p>
+ The HTML interface is protected against CSRF but the text and JMX interfaces
+ are not. To maintain the CSRF protection:
+ </p>
+ <ul>
+ <li>The deprecated <tt>manager</tt> role should not be assigned to any
+ user.</li>
+ <li>Users with the <tt>manager-gui</tt> role should not be granted either
+ the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
+ <li>If the text or jmx interfaces are accessed through a browser (e.g. for
+ testing since these interfaces are intended for tools not humans) then
+ the browser must be closed afterwards to terminate the session.</li>
+ </ul>
+ <p>
+ For more information - please see the
+ <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
+ </p>
+ </body>
+
+</html>
\ No newline at end of file
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/401.jsp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp Wed Oct 12 22:49:28 2011
@@ -0,0 +1,98 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%
+ response.setHeader("WWW-Authenticate", "Basic realm=\"Tomcat Manager Application\"");
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>403 Access Denied</title>
+ <style type="text/css">
+ <!--
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+ H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ PRE, TT {border: 1px dotted #525D76}
+ A {color : black;}A.name {color : black;}
+ -->
+ </style>
+ </head>
+ <body>
+ <h1>403 Access Denied</h1>
+ <p>
+ You are not authorized to view this page.
+ </p>
+ <p>
+ If you have already configured the Manager application to allow access and
+ you have used your browser's back button, used a saved book-mark or similar
+ then you may have triggered the cross-site request forgery (CSRF) protection
+ that has been enabled for the HTML interface of the Manager application. You
+ will need to reset this protection by returning to the
+ <a href="<%=request.getContextPath()%>/html">main Manager page</a>. Once you
+ return to this page, you will be able to continue using the Manager
+ appliction's HTML interface normally. If you continue to see this access
+ denied message, check that you have the necessary permissions to access this
+ application.
+ </p>
+ <p>
+ If you have not changed
+ any configuration files, please examine the file
+ <tt>conf/tomcat-users.xml</tt> in your installation. That
+ file must contain the credentials to let you use this webapp.
+ </p>
+ <p>
+ For example, to add the <tt>manager-gui</tt> role to a user named
+ <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+ config file listed above.
+ </p>
+<pre>
+<role rolename="manager-gui"/>
+<user username="tomcat" password="s3cret" roles="manager-gui"/>
+</pre>
+ <p>
+ Note that for Tomcat 6.0.30 onwards, the roles required to use the manager
+ application were changed from the single <tt>manager</tt> role to add the
+ following four roles. (The manager role is still available but should not be
+ used as it avoids the CSRF protection). You will need to assign the role(s)
+ required for the functionality you wish to access.
+ </p>
+ <ul>
+ <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
+ pages</li>
+ <li><tt>manager-script</tt> - allows access to the text interface and the
+ status pages</li>
+ <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
+ pages</li>
+ <li><tt>manager-status</tt> - allows access to the status pages only</li>
+ </ul>
+ <p>
+ The HTML interface is protected against CSRF but the text and JMX interfaces
+ are not. To maintain the CSRF protection:
+ </p>
+ <ul>
+ <li>users with the <tt>manager-gui</tt> role should not be granted either
+ the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
+ <li>if the text or jmx interfaces are accessed through a browser (e.g. for
+ testing since these interfaces are intended for tools not humans) then
+ the browser must be closed afterwards to terminate the session.</li>
+ </ul>
+ <p>
+ For more information - please see the
+ <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
+ </p>
+ </body>
+
+</html>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/403.jsp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml Wed Oct 12 22:49:28 2011
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context antiResourceLocking="false" privileged="true" useHttpOnly="true" />
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/META-INF/context.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp Wed Oct 12 22:49:28 2011
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@page session="false" contentType="text/html; charset=ISO-8859-1" %>
+<%@page import="java.util.Enumeration" %>
+<%@page import="javax.servlet.http.HttpSession" %>
+<%@page import="org.apache.catalina.Session" %>
+<%@page import="org.apache.catalina.manager.JspHelper" %>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+ Session currentSession = (Session)request.getAttribute("currentSession");
+ HttpSession currentHttpSession = currentSession.getSession();
+ String currentSessionId = JspHelper.escapeXml(currentSession.getId());
+ String submitUrl = JspHelper.escapeXml(response.encodeURL(
+ ((HttpServletRequest) pageContext.getRequest()).getRequestURI() +
+ "?path=" + path));
+%>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <meta http-equiv="pragma" content="no-cache"/><!-- HTTP 1.0 -->
+ <meta http-equiv="cache-control" content="no-cache,must-revalidate"/><!-- HTTP 1.1 -->
+ <meta http-equiv="expires" content="0"/><!-- 0 is an invalid value and should be treated as 'now' -->
+ <meta http-equiv="content-language" content="en"/>
+ <meta name="author" content="Cedrik LIME"/>
+ <meta name="copyright" content="copyright 2005-2011 the Apache Software Foundation"/>
+ <meta name="robots" content="noindex,nofollow,noarchive"/>
+ <title>Sessions Administration: details for <%= currentSessionId %></title>
+</head>
+<body>
+<h1>Details for Session <%= currentSessionId %></h1>
+
+<table style="text-align: left;" border="0">
+ <tr>
+ <th>Session Id</th>
+ <td><%= currentSessionId %></td>
+ </tr>
+ <tr>
+ <th>Guessed Locale</th>
+ <td><%= JspHelper.guessDisplayLocaleFromSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>Guessed User</th>
+ <td><%= JspHelper.guessDisplayUserFromSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>Creation Time</th>
+ <td><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>Last Accessed Time</th>
+ <td><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>Session Max Inactive Interval</th>
+ <td><%= JspHelper.secondsToTimeString(currentSession.getMaxInactiveInterval()) %></td>
+ </tr>
+ <tr>
+ <th>Used Time</th>
+ <td><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>Inactive Time</th>
+ <td><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %></td>
+ </tr>
+ <tr>
+ <th>TTL</th>
+ <td><%= JspHelper.getDisplayTTLForSession(currentSession) %></td>
+ </tr>
+</table>
+
+<form method="post" action="<%= submitUrl %>">
+ <div>
+ <input type="hidden" name="sessionId" value="<%= currentSessionId %>" />
+ <input type="hidden" name="action" value="sessionDetail" />
+ <input type="submit" value="Refresh" />
+ </div>
+</form>
+
+<div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
+<div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
+
+<table style="text-align: left;" border="1" cellpadding="2" cellspacing="2">
+<% int nAttributes = 0;
+ Enumeration attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+ while (attributeNamesEnumeration.hasMoreElements()) {
+ attributeNamesEnumeration.nextElement();
+ ++nAttributes;
+ }
+%>
+ <caption style="font-variant: small-caps;"><%= JspHelper.formatNumber(nAttributes) %> attributes</caption>
+ <thead>
+ <tr>
+ <th>Remove Attribute</th>
+ <th>Attribute name</th>
+ <th>Attribute value</th>
+ </tr>
+ </thead>
+ <%--tfoot>
+ <tr>
+ <td colspan="3" style="text-align: center;">
+ TODO: set Max Inactive Interval on sessions
+ </td>
+ </tr>
+ </tfoot--%>
+ <tbody>
+<% attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+ while (attributeNamesEnumeration.hasMoreElements()) {
+ String attributeName = (String) attributeNamesEnumeration.nextElement();
+%>
+ <tr>
+ <td align="center">
+ <form method="post" action="<%= submitUrl %>">
+ <div>
+ <input type="hidden" name="action" value="removeSessionAttribute" />
+ <input type="hidden" name="sessionId" value="<%= currentSessionId %>" />
+ <input type="hidden" name="attributeName" value="<%= JspHelper.escapeXml(attributeName) %>" />
+ <input type="submit" value="Remove" />
+ </div>
+ </form>
+ </td>
+ <td><%= JspHelper.escapeXml(attributeName) %></td>
+ <td><% Object attributeValue = currentHttpSession.getAttribute(attributeName); %><span title="<%= attributeValue == null ? "" : attributeValue.getClass().toString() %>"><%= JspHelper.escapeXml(attributeValue) %></span></td>
+ </tr>
+<% } // end while %>
+ </tbody>
+</table>
+
+<form method="post" action="<%=submitUrl%>">
+ <p style="text-align: center;">
+ <input type="submit" value="Return to session list" />
+ </p>
+</form>
+
+<%--div style="display: none;">
+<p>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-html401"
+ alt="Valid HTML 4.01!" height="31" width="88"></a>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0!" height="31" width="88" /></a>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml11"
+ alt="Valid XHTML 1.1!" height="31" width="88" /></a>
+</p>
+</div--%>
+
+</body>
+</html>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionDetail.jsp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp Wed Oct 12 22:49:28 2011
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@page session="false" contentType="text/html; charset=ISO-8859-1" %>
+<%@page import="java.util.Collection" %>
+<%@page import="java.util.Iterator" %>
+<%@page import="org.apache.catalina.manager.JspHelper" %>
+<%@page import="org.apache.catalina.Session" %>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+ String submitUrl = JspHelper.escapeXml(response.encodeURL(
+ ((HttpServletRequest) pageContext.getRequest()).getRequestURI() +
+ "?path=" + path));
+ Collection activeSessions = (Collection) request.getAttribute("activeSessions");
+%>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <meta http-equiv="pragma" content="no-cache"/><!-- HTTP 1.0 -->
+ <meta http-equiv="cache-control" content="no-cache,must-revalidate"/><!-- HTTP 1.1 -->
+ <meta http-equiv="expires" content="0"/><!-- 0 is an invalid value and should be treated as 'now' -->
+ <meta http-equiv="content-language" content="en"/>
+ <meta name="author" content="Cedrik LIME"/>
+ <meta name="copyright" content="copyright 2005-2011 the Apache Software Foundation"/>
+ <meta name="robots" content="noindex,nofollow,noarchive"/>
+ <title>Sessions Administration for <%= JspHelper.escapeXml(path) %></title>
+</head>
+<body>
+<h1>Sessions Administration for <%= JspHelper.escapeXml(path) %></h1>
+
+<p>Tips:</p>
+<ul>
+ <li>Click on a column to sort.</li>
+ <li>To view a session details and/or remove a session attributes, click on its id.</li>
+</ul>
+
+<div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
+<div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
+
+<form action="<%= submitUrl %>" method="post" id="sessionsForm">
+ <fieldset><legend>Active HttpSessions informations</legend>
+ <input type="hidden" name="action" id="sessionsFormAction" value="injectSessions"/>
+ <input type="hidden" name="sort" id="sessionsFormSort" value="<%= JspHelper.escapeXml(request.getAttribute("sort")) %>"/>
+ <% String order = (String) request.getAttribute("order");
+ if (order == null || "".equals(order)) {
+ order = "ASC";
+ }
+ %>
+ <input type="hidden" name="order" id="sessionsFormSortOrder" value="<%= JspHelper.escapeXml(order) %>"/>
+ <input type="submit" name="refresh" id="refreshButton" value="Refresh Sessions list" onclick="document.getElementById('sessionsFormAction').value='refreshSessions'; return true;"/>
+ <%= JspHelper.formatNumber(activeSessions.size()) %> active Sessions<br/>
+ <table border="1" cellpadding="2" cellspacing="2" width="100%">
+ <thead>
+ <tr>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
+ </tr>
+ </thead>
+ <% if (activeSessions.size() > 10) { %>
+ <tfoot><%-- <tfoot> is the same as <thead> --%>
+ <tr>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
+ <th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
+ </tr>
+ </tfoot>
+ <% } // end if %>
+ <tbody>
+<% Iterator iter = activeSessions.iterator();
+ while (iter.hasNext()) {
+ Session currentSession = (Session) iter.next();
+ String currentSessionId = JspHelper.escapeXml(currentSession.getId());
+%>
+ <tr>
+ <td>
+<input type="checkbox" name="sessionIds" value="<%= currentSessionId %>" /><a href="<%= submitUrl %>&action=sessionDetail&sessionId=<%= currentSessionId %>"><%= currentSessionId %></a>
+ </td>
+ <td style="text-align: center;"><%= JspHelper.guessDisplayLocaleFromSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.guessDisplayUserFromSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %></td>
+ <td style="text-align: center;"><%= JspHelper.getDisplayTTLForSession(currentSession) %></td>
+ </tr>
+<% } // end while %>
+ </tbody>
+ </table>
+ <p style="text-align: center;">
+ <input type="submit" name="invalidate" value="Invalidate selected Sessions" onclick="document.getElementById('sessionsFormAction').value='invalidateSessions'; return true;"/>
+ </p>
+ </fieldset>
+</form>
+
+<form method="get" action="<%=request.getContextPath()%>/html">
+ <p style="text-align: center;">
+ <input type="submit" value="Return to main page" />
+ </p>
+</form>
+
+<%--div style="display: none;">
+<p>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-html401"
+ alt="Valid HTML 4.01!" height="31" width="88"></a>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0!" height="31" width="88" /></a>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml11"
+ alt="Valid XHTML 1.1!" height="31" width="88" /></a>
+</p>
+</div--%>
+
+</body>
+</html>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/jsp/sessionsList.jsp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml Wed Oct 12 22:49:28 2011
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <display-name>Tomcat Manager Application</display-name>
+ <description>
+ A scriptable management web application for the Tomcat Web Server;
+ Manager lets you view, load/unload/etc particular web applications.
+ </description>
+
+ <servlet>
+ <servlet-name>Manager</servlet-name>
+ <servlet-class>org.apache.catalina.manager.ManagerServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>2</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>HTMLManager</servlet-name>
+ <servlet-class>org.apache.catalina.manager.HTMLManagerServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>2</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>Status</servlet-name>
+ <servlet-class>org.apache.catalina.manager.StatusManagerServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>JMXProxy</servlet-name>
+ <servlet-class>org.apache.catalina.manager.JMXProxyServlet</servlet-class>
+ </servlet>
+
+ <!-- Define the Manager Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/list</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/expire</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/sessions</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/start</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/stop</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/install</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/remove</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/deploy</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/undeploy</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/reload</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/save</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/serverinfo</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/roles</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/resources</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Manager</servlet-name>
+ <url-pattern>/findleaks</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Status</servlet-name>
+ <url-pattern>/status/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>JMXProxy</servlet-name>
+ <url-pattern>/jmxproxy/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>HTMLManager</servlet-name>
+ <url-pattern>/html/*</url-pattern>
+ </servlet-mapping>
+
+ <filter>
+ <filter-name>CSRF</filter-name>
+ <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
+ <init-param>
+ <param-name>entryPoints</param-name>
+ <param-value>/html,/html/,/html/list</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>CSRF</filter-name>
+ <servlet-name>HTMLManager</servlet-name>
+ </filter-mapping>
+
+ <!-- Define reference to the user database for looking up roles -->
+ <resource-env-ref>
+ <description>
+ Link to the UserDatabase instance from which we request lists of
+ defined role names. Typically, this will be connected to the global
+ user database with a ResourceLink element in server.xml or the context
+ configuration file for the Manager web application.
+ </description>
+ <resource-env-ref-name>users</resource-env-ref-name>
+ <resource-env-ref-type>
+ org.apache.catalina.UserDatabase
+ </resource-env-ref-type>
+ </resource-env-ref>
+
+ <!-- Define a Security Constraint on this Application -->
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Manager commands</web-resource-name>
+ <url-pattern>/list</url-pattern>
+ <url-pattern>/expire</url-pattern>
+ <url-pattern>/sessions</url-pattern>
+ <url-pattern>/start</url-pattern>
+ <url-pattern>/stop</url-pattern>
+ <url-pattern>/install</url-pattern>
+ <url-pattern>/remove</url-pattern>
+ <url-pattern>/deploy</url-pattern>
+ <url-pattern>/undeploy</url-pattern>
+ <url-pattern>/reload</url-pattern>
+ <url-pattern>/save</url-pattern>
+ <url-pattern>/serverinfo</url-pattern>
+ <url-pattern>/roles</url-pattern>
+ <url-pattern>/resources</url-pattern>
+ <url-pattern>/findleaks</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <!-- NOTE: 1. These roles are not present in the default users file
+ 2. The manager role is deprecated, it will be removed in
+ Tomcat 7.
+ 3. Use the manager-script role to take advantage of the new
+ CSRF protection. Using the manager role or assigning both
+ the manager-script and manager-gui roles to the same user
+ will bypass the CSRF protection. -->
+ <role-name>manager-script</role-name>
+ <role-name>manager</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HTML Manager commands</web-resource-name>
+ <url-pattern>/html/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <!-- NOTE: 1. These roles are not present in the default users file
+ 2. The manager role is deprecated, it will be removed in
+ Tomcat 7.
+ 3. Use just the manager-gui role to take advantage of the new
+ CSRF protection. Assigning the manager role or manager-gui
+ role along with either the manager-script or manager-jmx
+ roles to the same user will bypass the CSRF protection. -->
+ <role-name>manager-gui</role-name>
+ <role-name>manager</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>JMX proxy</web-resource-name>
+ <url-pattern>/jmxproxy/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <!-- NOTE: 1. These roles are not present in the default users file
+ 2. The manager role is deprecated, it will be removed in
+ Tomcat 7.
+ 3. Use the manager-jmx role to take advantage of the new
+ CSRF protection. Using the manager role or assigning both
+ the manager-jmx and manager-gui roles to the same user
+ will bypass the CSRF protection. -->
+ <role-name>manager-jmx</role-name>
+ <role-name>manager</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Status</web-resource-name>
+ <url-pattern>/status/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <!-- NOTE: 1. These roles are not present in the default users file
+ 2. The manager role is deprecated, it will be removed in
+ Tomcat 7. -->
+ <role-name>manager-status</role-name>
+ <role-name>manager-gui</role-name>
+ <role-name>manager-script</role-name>
+ <role-name>manager-jmx</role-name>
+ <role-name>manager</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+
+ <!-- Define the Login Configuration for this Application -->
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>Tomcat Manager Application</realm-name>
+ </login-config>
+
+ <!-- Security roles referenced by this web application -->
+ <security-role>
+ <description>
+ The role that is required to access the HTML Manager pages
+ </description>
+ <role-name>manager-gui</role-name>
+ </security-role>
+ <security-role>
+ <description>
+ The role that is required to access the text Manager pages
+ </description>
+ <role-name>manager-script</role-name>
+ </security-role>
+ <security-role>
+ <description>
+ The role that is required to access the HTML JMX Proxy
+ </description>
+ <role-name>manager-jmx</role-name>
+ </security-role>
+ <security-role>
+ <description>
+ The role that is required to access to the Manager Status pages
+ </description>
+ <role-name>manager-status</role-name>
+ </security-role>
+ <security-role>
+ <description>
+ Deprecated role that can access all Manager functionality
+ </description>
+ <role-name>manager</role-name>
+ </security-role>
+
+ <error-page>
+ <error-code>401</error-code>
+ <location>/401.jsp</location>
+ </error-page>
+ <error-page>
+ <error-code>403</error-code>
+ <location>/403.jsp</location>
+ </error-page>
+
+</web-app>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/add.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/add.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/add.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/add.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/asf-logo.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/asf-logo.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/asf-logo.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/asf-logo.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/code.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/code.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/code.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/code.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/design.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/design.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/design.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/design.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/docs.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/docs.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/docs.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/docs.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/fix.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/fix.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/fix.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/fix.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/tomcat.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/tomcat.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/tomcat.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/tomcat.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/update.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/update.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/update.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/update.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/void.gif
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/void.gif?rev=1182608&view=auto
==============================================================================
Files tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/void.gif (added) and tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/images/void.gif Wed Oct 12 22:49:28 2011 differ
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd Wed Oct 12 22:49:28 2011
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by peter lin (consultant) -->
+<!--W3C Schema generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:complexType name="connector">
+ <xs:sequence>
+ <xs:element name="threadInfo" type="threadInfo"/>
+ <xs:element name="requestInfo" type="requestInfo"/>
+ <xs:element name="workers" type="workers"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="jvm">
+ <xs:sequence>
+ <xs:element name="memory" type="memory"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="memory">
+ <xs:attribute name="free" type="xs:long" use="required"/>
+ <xs:attribute name="total" type="xs:long" use="required"/>
+ <xs:attribute name="max" type="xs:long" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="requestInfo">
+ <xs:attribute name="maxTime" type="xs:long" use="required"/>
+ <xs:attribute name="processingTime" type="xs:int" use="required"/>
+ <xs:attribute name="requestCount" type="xs:long" use="required"/>
+ <xs:attribute name="errorCount" type="xs:long" use="required"/>
+ <xs:attribute name="bytesReceived" type="xs:long" use="required"/>
+ <xs:attribute name="bytesSent" type="xs:long" use="required"/>
+ </xs:complexType>
+ <xs:element name="status">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="jvm" type="jvm"/>
+ <xs:element name="connector" type="connector"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="threadInfo">
+ <xs:attribute name="maxThreads" type="xs:int" use="required"/>
+ <xs:attribute name="minSpareThreads" type="xs:int" use="required"/>
+ <xs:attribute name="maxSpareThreads" type="xs:int" use="required"/>
+ <xs:attribute name="currentThreadCount" type="xs:int" use="required"/>
+ <xs:attribute name="currentThreadsBusy" type="xs:int" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="worker">
+ <xs:attribute name="stage" type="xs:string" use="required"/>
+ <xs:attribute name="requestProcessingTime" type="xs:int" use="required"/>
+ <xs:attribute name="requestBytesSent" type="xs:long" use="required"/>
+ <xs:attribute name="requestBytesRecieved" type="xs:long" use="required"/>
+ <xs:attribute name="remoteAddr" type="xs:string" use="required"/>
+ <xs:attribute name="virtualHost" type="xs:string" use="required"/>
+ <xs:attribute name="method" type="xs:string" use="required"/>
+ <xs:attribute name="currentUri" type="xs:string" use="required"/>
+ <xs:attribute name="currentQueryString" type="xs:string" use="required"/>
+ <xs:attribute name="protocol" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="workers">
+ <xs:sequence>
+ <xs:element name="worker" type="worker"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/status.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl?rev=1182608&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl (added)
+++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl Wed Oct 12 22:49:28 2011
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <!-- Output method -->
+ <xsl:output encoding="iso-8859-1"
+ indent="no"/>
+
+ <xsl:template match="status">
+ <html>
+ <head>
+ <TITLE>Tomcat Status</TITLE>
+ <STYLE type="text/css">
+ body, table, tr, td, a, div, span {
+ vertical-align : top;
+ }
+ </STYLE>
+ </head>
+ <body>
+ <div style='font-size:20px;'>Tomcat Status</div>
+
+ <xsl:apply-templates select="jvm"/>
+ <xsl:apply-templates select="connector"/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="jvm">
+ <xsl:apply-templates select="memory"/>
+ </xsl:template>
+
+ <xsl:template match="memory">
+ <table><tr>
+ <td><b>JVM:</b></td>
+ <td><b>free:</b> <xsl:value-of select="@free"/></td>
+ <td><b>total:</b> <xsl:value-of select="@total"/></td>
+ <td><b>max:</b> <xsl:value-of select="@max"/></td>
+ </tr>
+ </table><hr />
+ </xsl:template>
+
+ <xsl:template match="connector">
+ <b>Connector -- </b> <xsl:value-of select="@name"/><br />
+
+ <xsl:apply-templates select="threadInfo"/>
+ <xsl:apply-templates select="requestInfo"/>
+ <xsl:apply-templates select="workers"/>
+ </xsl:template>
+
+ <xsl:template match="threadInfo">
+ <table><tr>
+ <td><b>threadInfo </b></td>
+ <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td>
+ <td><b>minSpareThreads:</b> <xsl:value-of select="@minSpareThreads"/></td>
+ <td><b>maxSpareThreads:</b> <xsl:value-of select="@maxSpareThreads"/></td>
+ <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td>
+ <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td>
+ </tr>
+ </table><hr />
+ </xsl:template>
+
+ <xsl:template match="requestInfo">
+ <table><tr>
+ <td><b>requestInfo </b></td>
+ <td><b>maxTime:</b> <xsl:value-of select="@maxTime"/></td>
+ <td><b>processingTime:</b> <xsl:value-of select="@processingTime"/></td>
+ <td><b>requestCount:</b> <xsl:value-of select="@requestCount"/></td>
+ <td><b>errorCount:</b> <xsl:value-of select="@errorCount"/></td>
+ <td><b>bytesReceived:</b> <xsl:value-of select="@bytesReceived"/></td>
+ <td><b>bytesSent:</b> <xsl:value-of select="@bytesSent"/></td>
+ </tr>
+ </table><hr />
+ </xsl:template>
+
+ <xsl:template match="workers">
+ <table>
+ <tr><th>Stage</th><th>Time</th><th>B Sent</th><th>B Recv</th><th>Client</th><th>VHost</th><th>Request</th></tr>
+ <xsl:apply-templates select="worker"/>
+
+ </table><hr />
+ </xsl:template>
+
+ <xsl:template match="worker">
+ <tr>
+ <td><xsl:value-of select="@stage"/></td>
+ <td><xsl:value-of select="@requestProcessingTime"/></td>
+ <td><xsl:value-of select="@requestBytesSent"/></td>
+ <td><xsl:value-of select="@requestBytesReceived"/></td>
+ <td><xsl:value-of select="@remoteAddr"/></td>
+ <td><xsl:value-of select="@virtualHost"/></td>
+ <td><xsl:value-of select="@method"/> <xsl:value-of select="@currentUri"/>?<xsl:value-of select="@currentQueryString"/> <xsl:value-of select="@protocol"/></td>
+ </tr>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/test/resources/deploy-war-project/src/manager/xform.xsl
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java?rev=1182608&r1=1182607&r2=1182608&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java (original)
+++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java Wed Oct 12 22:49:28 2011
@@ -139,6 +139,7 @@ public class RunMojo
try
{
temporaryContextFile = File.createTempFile("tomcat-maven-plugin", "temp-ctx-file");
+ temporaryContextFile.deleteOnExit();
fw = new FileWriter(temporaryContextFile);
// format to modify/create <Context backgroundProcessorDelay="5" reloadable="false">
if ( contextFile != null && contextFile.exists() )
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org