Skip to content

realityforge/proxy-servlet

Repository files navigation

Proxy-Servlet

Build Status

The proxy-servlet provides a base class to make it easy to create proxy servlets.

Usage

Download the jar from maven central. This can be done by adding a Maven dependency such as;

<dependency>
   <groupId>org.realityforge.proxy-servlet</groupId>
   <artifactId>proxy-servlet</artifactId>
   <version>0.3.0</version>
</dependency>

A simple proxy that forwards to a url configured in JNDI.

@WebServlet( urlPatterns = { "/myservice/*" }, loadOnStartup = 1 )
public class MyServiceProxyServlet
  extends AbstractProxyServlet
{
  @Resource( lookup = "myservice/endpoint" )
  private String _proxyURL;

  @Override
  protected String getProxyURL()
  {
    return _proxyURL;
  }
}

Credit

This a customization of work done by David Smiley and he takes all the credit for the good parts of the library. All bugs are certainly Peter Donald's.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages