-
Notifications
You must be signed in to change notification settings - Fork 414
Open
Description
I would like to change the default port used when double-clicking WebGoat-6.0.1-war-exec.jar (not running it from the command line with the -httpPort flag).
Is there any way to change the port in code?
I have tried setting the port in pom.xml, as specified by https://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin/run-mojo.html#port:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>exec-war-only</goal>
</goals>
<phase>package</phase>
<configuration>
<port>8666</port>
<url>http://localhost:8666/manager</url>
<path>/WebGoat</path>
<attachArtifactClassifier>exec</attachArtifactClassifier>
</configuration>
</execution>
</executions>
</plugin>
But this still starts up WebGoat on 8080:
[INFO] <<< tomcat7-maven-plugin:2.1:run (default-cli) < process-classes @ WebGoat <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:run (default-cli) @ WebGoat ---
[INFO] Running war on http://localhost:8080/WebGoat
[INFO] Using existing Tomcat server configuration at /Users/augustd/Documents/Dev/WebGoat-Legacy/target/tomcat
[INFO] create webapp with contextPath: /WebGoat
Jan 21, 2016 12:09:25 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 21, 2016 12:09:25 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jan 21, 2016 12:09:25 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
...
INFO: Initializing Spring root WebApplicationContext
Jan 21, 2016 12:09:27 PM org.apache.catalina.core.ApplicationContext log
INFO: WebGoat is starting
Jan 21, 2016 12:09:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'mvc-dispatcher'
Jan 21, 2016 12:09:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels