An open API service indexing awesome lists of open source software.

https://github.com/tipsy/javalin-tomcat-embed-example


https://github.com/tipsy/javalin-tomcat-embed-example

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Forked from https://gitlab.com/mvysny/javalin-tomcat-embed-test

## Javalin Tomcat Embed Test

Demoes embedding of [Javalin](https://javalin.io/) into the Tomcat servlet
container, without having to have Jetty on classpath.
See https://github.com/tipsy/javalin/issues/402 for more details.

To run the demo, just open your terminal and type:

```bash
git clone https://github.com/tipsy/javalin-tomcat-embed-example
cd javalin-tomcat-embed-example
./gradlew clean appRun
```

This will run Gradle Gretty plugin which in turn launches this WAR app in Tomcat.
When the server boots, you can access the REST endpoint simply by typing
this in your terminal, or opening http://localhost:8080/rest :

```bash
curl localhost:8080/rest/
```

It should print "Hello!".

The demo consists of only one class: [MyRestServlet.kt](src/main/kotlin/example/MyRestServlet.kt).