Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Default Port #53

Open
augustd opened this issue Jan 21, 2016 · 0 comments
Open

Change Default Port #53

augustd opened this issue Jan 21, 2016 · 0 comments

Comments

@augustd
Copy link

augustd commented Jan 21, 2016

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"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant