Jetty Application Server - TechDoko

Hot

Post Top Ad

Jetty Application Server

How to Install Jetty Application Server
Jetty is an open-source Servlet container and Application Server which is known to be lightweight, portable, robust, flexible, extensible and providing support for various technologies like SPDY, WebSocket, OSGi, JMX, JNDI, and JAAS. Jetty is very convenient for development and also widely used in production environments.

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
Create a WAR file and drop that file in the webapps folder. We do not even need to restart Jetty. webapps directory is monitored periodically and new applications are deployed automatically.

Changing the Jetty Port
By default, Jetty runs on 8080. In order to change it to some other port, we have to do the following:
- Open start.ini under Jetty root directory.
- Add this line jetty.port=7070
- Save and close the file.

No comments:

Post a Comment