https://github.com/tipsy/javalin-tomcat-embed-example
https://github.com/tipsy/javalin-tomcat-embed-example
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tipsy/javalin-tomcat-embed-example
- Owner: tipsy
- Created: 2018-11-17T12:51:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-24T07:02:32.000Z (almost 6 years ago)
- Last Synced: 2025-01-30T00:22:33.845Z (12 months ago)
- Language: Kotlin
- Size: 60.5 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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).