Questions tagged [ratpack]

Ratpack a toolkit for creating high performance web applications built on Java and Netty.

Ratpack is a set of Java libraries that facilitate fast, efficient, evolvable and well tested HTTP applications.

It is built on the highly performant and efficient Netty event-driven networking engine. The API is optimized for Groovy and Java 8.

Optional Google Guice integration provides a foundation for scaling your application in size in a managed way.

Optional Gradle build time support makes building and testing applications a breeze.

Ratpack focuses on allowing HTTP applications to be efficient, modular, adaptive to new requirements and technologies, and well-tested over time.

enter image description here

Ratpack Introduction provides a quick comparison with similar products.

Github

88 questions
7
votes
2 answers

Is Spring Boot + Spring MVC + Ratpack possible?

We're a Spring Boot shop and rely heavily on Spring MVC for our REST endpoints. We use Boot and embedded Tomcat to create a self-hosting JAR. Is it possible to replace Tomcat with Ratback while still keeping all my Spring MVC code in place? I am…
user1836542
  • 354
  • 1
  • 3
  • 9
6
votes
3 answers

Parse json in Ratpack Groovy

I started a small ratpack app in the Groovy console but I couldn't work out from the documentation how to get a hold of json data that has been sent in the request. @Grab("io.ratpack:ratpack-groovy:0.9.4") import static…
shmish111
  • 3,697
  • 5
  • 30
  • 52
4
votes
1 answer

Nginx does not return 304 for "if-modified-since" header

I have a server running nginx that serves a web application built with ratpack and I can not manage to get the 304 response from when requesting the website from a browser or with curl. Nginx conf: location / { proxy_set_header X-Real-IP…
andie
  • 93
  • 1
  • 4
4
votes
1 answer

groovy html template ' yieldUnescaped ' is ignored in ratpack

I am trying to inject a partial html into GTPL file, but it seems always "escapes" html content. How can send HTML snippet to markup and render it directly? Contents of "hello.gtpl" yieldUnescaped '' html { yieldUnescaped…
Jayan
  • 18,003
  • 15
  • 89
  • 143
3
votes
1 answer

Is there a way to get a Promise from ratpack ctx.next()

I have written a ratpack handler that measures the execution time of a handler chain. public class EndpointMetricsEmitter implements Handler { public static final String HANDLE_DURATION_METRIC = "HANDLE_DURATION_MILLIS"; private final…
OhadBasan
  • 797
  • 6
  • 15
3
votes
1 answer

Using `prefix {}` method instead of `all { byMethod { } }` in Ratpack causes 405 Method Not Allowed - what's wrong?

I've just started reading "Learn Ratpack", in one of the examples from the very beginning of the book, the author uses 'all', 'byMethod', 'get' and 'post' to exemplify how to parse request data, the way that he does it work, but I've tried using…
3
votes
2 answers

JOOQ DAO using Transaction support

Iam using JOOQ/Hikari to perform DB operations on Postgres. I have been trying to look at some examples of using Transactional operations using JOOQ on generated DAOs. Most of my colleagues use Spring Transactions but I am using Guice for DI so do…
Vijay Ram
  • 285
  • 2
  • 15
3
votes
2 answers

Ratpack Rest API ExceptionHandler

I want to have single ExceptionHandler for handling each exception while implementing REST API using ratpack. This ExceptionHandler will handle each runtime exception and send json response accordingly. Is it possible in ratpack? In Spring we do…
Md Zahid Raza
  • 941
  • 1
  • 11
  • 28
3
votes
1 answer

Removing ExecControl to upgrade to Ratpack v1.1.1?

I am learning Ratpack and working from multiple resources. I have the following interface and class that works in Ratpack v0.9.18 but fails in v1.1.1 because of removal of the ExecControl interface. //file:…
TeamDitto
  • 507
  • 1
  • 6
  • 18
2
votes
1 answer

Ratpack: how to render file from classpath?

I want to render or send a "static" file from the classpath. Logistically the file comes from a referenced project and is available under classpath root. My code so far: handlers { get{ log.info "trying to get index ${file(…
injecteer
  • 20,038
  • 4
  • 45
  • 89
2
votes
1 answer

Ratpack + Thymeleaf + shadowJar - Error resolving template "home", template might not exist or might not be accessible

I'm working on ratpack.io web app and using gradle as the build tool. Templates are rendered from template files in a src/main/thymeleaf directory, which works fine at runtime (just using gradle run). $ ls ./src/main/thymeleaf home.html I'm…
voodoogiant
  • 2,118
  • 6
  • 29
  • 49
2
votes
2 answers

In Ratpack, how can I configure loading configuration from an external file?

I have a Ratpack app written with the Groovy DSL. (Embedded in Java, so not a script.) I want to load the server's SSL certificates from a config file supplied in the command line options. (The certs will directly embedded in the config, or…
wu-lee
  • 749
  • 4
  • 17
2
votes
2 answers

Profiling Ratpack: ExecControllerBindingThreadFactory high CPU usage and lots of threads

We have a mobile app API server written with Ratpack 1.5.1 about to go live soon, and we're currently profiling the application to catch any performance bottlenecks. The app is backed by an SQL database and we're careful to always run queries using…
Gregor Petrin
  • 2,891
  • 1
  • 20
  • 24
2
votes
1 answer

Ratpack: define routes reading from a list

I want to create a "mock" server using Ratpack. First, I'm reading from a folder and defining a list of pairs, each pair has: A path The mock response for that path I want to launch a server that defines those routes and responses: // this is…
Manu Artero
  • 9,238
  • 6
  • 58
  • 73
2
votes
2 answers

Ratpack handlers -how to add more than one prefixes

I am trying to add kind of hello/name (for health check) for my app but I do not want to do that part of my chainAction. .handlers(chain -> chain .prefix("api", TaskChainAction.class)) ); What it takes to add second hello…
Vijay Ram
  • 285
  • 2
  • 15
1
2 3 4 5 6