response.sendRedirect seems to be what you are after.
On Fri, Jun 28, 2013 at 6:21 AM, Josh Stratton <[email protected]>wrote: > Is there a simple way to redirect a jetty request to another url or > handler? I'm used to django, where I could just call redirect() with the > url, but I can't find a similar operation in jetty. > > This seems has been a pretty common workflow for me, where a form, for > example, will submit some data to be processed and then the server will > redirect the request elsewhere like the home page. > > public class ServeGame extends AbstractHandler { > public void handle(String target, > Request baseRequest, > HttpServletRequest request, > HttpServletResponse response) > throws IOException, ServletException//, TemplateException > { > ... do some work ... > > redirect(baseRequest, "/"); // go to the home page > > } > } > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > >
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
