tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1234284 - in /tomcat/maven-plugin/trunk: tomcat-maven-archetype/src/main/resources/archetype-resources/ tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/
Date Sat, 21 Jan 2012 08:19:46 GMT
Author: olamy
Date: Sat Jan 21 08:19:45 2012
New Revision: 1234284

URL: http://svn.apache.org/viewvc?rev=1234284&view=rev
Log:
[MTOMCAT-115] Allow configuration of URI encoding for executable war.

Modified:
    tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
    tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
    tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java

Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml?rev=1234284&r1=1234283&r2=1234284&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
(original)
+++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
Sat Jan 21 08:19:45 2012
@@ -181,7 +181,7 @@
     </dependencies>
   </dependencyManagement>
 
-  <pluginRepositories>
+  <!--pluginRepositories>
     <pluginRepository>
       <id>apache.snapshots</id>
       <name>Apache Snapshots</name>
@@ -192,6 +192,6 @@
       <snapshots>
       </snapshots>
     </pluginRepository>
-  </pluginRepositories>
+  </pluginRepositories-->
 
 </project>

Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java?rev=1234284&r1=1234283&r2=1234284&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
Sat Jan 21 08:19:45 2012
@@ -95,6 +95,8 @@ public class Tomcat7Runner
 
     Tomcat tomcat;
 
+    String uriEncoding = "ISO-8859-1";
+
     /**
      * key = context of the webapp, value = war path on file system
      */
@@ -189,8 +191,7 @@ public class Tomcat7Runner
                 {
                     connector.setRedirectPort( httpsPort );
                 }
-                // FIXME parameter for that def ? ISO-8859-1
-                //connector.setURIEncoding(uriEncoding);
+                connector.setURIEncoding( uriEncoding );
 
                 tomcat.getService().addConnector( connector );
 
@@ -211,6 +212,7 @@ public class Tomcat7Runner
                 httpsConnector.setSecure( true );
                 httpsConnector.setProperty( "SSLEnabled", "true" );
                 httpsConnector.setProperty( "sslProtocol", "TLS" );
+                httpsConnector.setURIEncoding( uriEncoding );
 
                 String keystoreFile = System.getProperty( "javax.net.ssl.keyStore" );
                 String keystorePass = System.getProperty( "javax.net.ssl.keyStorePassword"
);
@@ -255,8 +257,7 @@ public class Tomcat7Runner
             {
                 Connector ajpConnector = new Connector( "org.apache.coyote.ajp.AjpProtocol"
);
                 ajpConnector.setPort( ajpPort );
-                // FIXME parameter for that def ? ISO-8859-1
-                //ajpConnector.setURIEncoding(uriEncoding);
+                ajpConnector.setURIEncoding( uriEncoding );
                 tomcat.getService().addConnector( ajpConnector );
             }
 

Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java?rev=1234284&r1=1234283&r2=1234284&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
(original)
+++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
Sat Jan 21 08:19:45 2012
@@ -87,6 +87,8 @@ public class Tomcat7RunnerCli
     static Option loggerName = OptionBuilder.withArgName( "loggerName" ).hasArg().withDescription(
         "logger to use: slf4j to use slf4j bridge on top of jul" ).create( "loggerName" );
 
+    static Option uriEncoding = OptionBuilder.withArgName( "uriEncoding" ).hasArg().withDescription(
+        "connector uriEncoding default ISO-8859-1" ).create( "uriEncoding" );
 
     static Options options = new Options();
 
@@ -95,7 +97,7 @@ public class Tomcat7RunnerCli
         options.addOption( httpPort ).addOption( httpsPort ).addOption( ajpPort ).addOption(
serverXmlPath ).addOption(
             resetExtract ).addOption( help ).addOption( debug ).addOption( sysProps ).addOption(
             httpProtocol ).addOption( clientAuth ).addOption( keyAlias ).addOption( obfuscate
).addOption(
-            extractDirectory ).addOption( loggerName );
+            extractDirectory ).addOption( loggerName ).addOption( uriEncoding );
     }
 
 
@@ -193,6 +195,11 @@ public class Tomcat7RunnerCli
             tomcat7Runner.loggerName = line.getOptionValue( loggerName.getOpt() );
         }
 
+        if ( line.hasOption( uriEncoding.getOpt() ) )
+        {
+            tomcat7Runner.uriEncoding = line.getOptionValue( uriEncoding.getOpt() );
+        }
+
         // here we go
         tomcat7Runner.run();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message