How to Install Jetty Application Server
Jetty presents Standalone, Embedded and Jetty Maven Plugin modes of operation.
- Download Jetty binaries from the Jetty Homepage
- First we have to extract the zip (or tgz) archive to a convenient directory. After extracting the binaries, have to go inside the root directory of the extracted folder and execute the following command.
java -jar start.jar
- If we see similar output like this 2015-11-06 23:00:18.042:INFO:oejs.Server:main: Started @1021ms at the end of the terminal then the Jetty is successfully started.
- To verify it through the browser, have to navigate to this url http://localhost:8080/ and we will get Error 404 - Not Found page with Jetty Server signature at the end like Powered by Jetty:// 9.3.5.v20151012
Running Web Applications In Jetty
Changing the Jetty Port
- Open start.ini under Jetty root directory.
- Add this line jetty.port=7070
- Save and close the file.