From: David Yu <dy...@we...> - 2008-10-06 08:19:36
|
See http://svn.codehaus.org/jetty/jetty/trunk/modules/extra/jetty-servlet/src/main/java/org/mortbay/servlet/ProxyServlet.java You could customize it to make it work for your needs. (line 101 to 104) Then you could add that in your jetty.xml <New class="org.mortbay.jetty.servlet.Context"> <Arg><Ref id="Contexts"/></Arg> <Arg>/</Arg> <Call name="addServlet"> <Arg>org.mortbay.servlet.ProxyServlet</Arg> <Arg>/patha/*</Arg> </Call> </New> Hope that helps, dyu Gleb Rybkin wrote: > > > ---------- Forwarded message ---------- > From: *Gleb Rybkin* <gr...@gm... <mailto:gr...@gm...>> > Date: Sat, Oct 4, 2008 at 9:10 AM > Subject: forward requests to a different server? > To: jet...@li... > <mailto:jet...@li...> > > > Hello, > > The front jetty page clearly says that it's possible to forward > requests to a different server, but I can't find any examples on how > to do so in the config files (jetty.xml). > > I'd like to be able to forward (proxy) requests made to > http://www.servera.com/patha to http://www.serverb.com/pathb > > Can anybody help? > > Thanks, > Gleb. > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > jetty-discuss mailing list > jet...@li... > https://lists.sourceforge.net/lists/listinfo/jetty-discuss > |