--
You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Does this work in the 0.62 release?I did thisServletBuilder sb = environment.addServlet(ProxyServlet.Transparent.class, "/service1/*");sb.setInitParam("ProxyTo","http://host1:8052/");sb.setInitParam("Prefix", "/service1");
and it get to other service but the root is missing, it gets[08/May/2014:16:40:50 +0000] "GET / HTTP/1.1" 405 1336 6 6instead of[08/May/2014:16:40:50 +0000] "GET /service1 HTTP/1.1" 405 1336 6 6
Ok, this is how to make it work in 0.6.2 ....
Two services
http://localhost:8082/api/application
http://localhost:8080/api/service2
Calls on application
GET http://localhost:8082/api/application/app1
Calls that get forward to service2 but from application uri
GET http://localhost:8082/api/service2
The links have the application server name and port and correct
Need to add this to you pom
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>8.1.10.v20130312</version>
</dependency>
import org.eclipse.jetty.servlets.ProxyServlet;
public class ApplicationService extends Service<ApplicationConfiguration> {
@Override
public void run(ApplicationConfiguration configuration, Environment environment)
throws Exception {
…
ServletBuilder sb = environment.addServlet(ProxyServlet.Transparent.class, "/api/service2/*");
sb.setInitParam("ProxyTo","http://service2_computer:8080/");
sb.setInitParam("Prefix", "/");
And this is how it looks with non-concurrent requests:
It looks like it's something kinky with Apache Benchmark but it actually works fine with nginx.
My question is, why? What's happening?
Here is relevant pieces.
Gradle