There's also a AsyncProxyServlet$Transparent http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/proxy/AsyncProxyServlet.Transparent.html
If you are going to bother to set async-supported true, might as well go whole-hog and use the async version of the proxy as well. -- Joakim Erdfelt <[email protected]> webtide.com <http://www.webtide.com/> - intalio.com/jetty Expert advice, services and support from from the Jetty & CometD experts eclipse.org/jetty - cometd.org On Wed, Oct 8, 2014 at 10:44 AM, Matt Deimel <[email protected]> wrote: > I know there's an AsyncProxyServlet, but I wasn't sure how it differs from > ProxyServlet$Transparent? Is it the preferred approach? Is there much > difference? > > Thanks. > > On Wed, Oct 8, 2014 at 11:44 AM, Joakim Erdfelt <[email protected]> > wrote: > >> You know there's an AsyncProxyServlet, right? >> >> >> http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/proxy/AsyncProxyServlet.html >> >> -- >> Joakim Erdfelt <[email protected]> >> webtide.com <http://www.webtide.com/> - intalio.com/jetty >> Expert advice, services and support from from the Jetty & CometD experts >> eclipse.org/jetty - cometd.org >> >> On Tue, Oct 7, 2014 at 7:25 PM, Matt Deimel <[email protected]> wrote: >> >>> Hi, >>> >>> I'm trying to create an async proxy using Jetty 9.2.3.v20140905. From >>> what I've ready and looked at before, I believe that I should be able to do >>> this through the web.xml of a maven project, and not require any code. >>> >>> Here you can see a very simple project that covers what I think should >>> work: https://github.com/mdeimel/jetty-proxy >>> >>> Below I have also included the web.xml file. I'm making use of >>> ProxyServlet$Transparent, and trying to proxy requests from >>> localhost:8080/cnn to www.cnn.com (just as a test). When I run this >>> with "mvn jetty:run" and access localhost:8080/cnn, it just tries to load, >>> and eventually fails with a 504 Gateway Timeout error. >>> >>> I believe this is everything that is required to make an async proxy, >>> but I must be missing something. If anyone could lend a hand I sure would >>> appreciate it. >>> >>> Thanks. >>> >>> --Matt >>> >>> <servlet> >>> <servlet-name>proxy</servlet-name> >>> >>> <servlet-class>org.eclipse.jetty.proxy.ProxyServlet$Transparent</servlet-class> >>> <init-param> >>> <param-name>maxThreads</param-name> >>> <param-value>1</param-value> >>> </init-param> >>> <init-param> >>> <param-name>proxyTo</param-name> >>> <param-value>http://www.cnn.com</param-value> >>> </init-param> >>> <init-param> >>> <param-name>prefix</param-name> >>> <param-value>/cnn</param-value> >>> </init-param> >>> <async-supported>true</async-supported> >>> </servlet> >>> <servlet-mapping> >>> <servlet-name>proxy</servlet-name> >>> <url-pattern>/cnn/*</url-pattern> >>> </servlet-mapping> >>> >>> _______________________________________________ >>> jetty-users mailing list >>> [email protected] >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >> >> >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
