How to use jax-rs (jersey implementation) with Tomcat (not j2ee server)
- windows
gradlew.bat build
- unix
./gradlew build
docker build -t jersey-api .
docker run --rm -it -p 8080:8080 jersey-api
- copy the war (build/libs/tomcat-jersey-rs-api.war) into tomcat webapps directory
http://localhost:8080/tomcat-jersey-rs-api/
will show (index JSP)
Index view
http://localhost:8080/tomcat-jersey-rs-api/rest/v1/entities
will show (rest controller)
Simple html response...
http://localhost:8080/tomcat-jersey-rs-api/rest/v1/entities/json
will show (rest controller, json path)
{"id":1638456518848,"active":true,"description":"example"}