Hi, I wrote Tomcat's Balancer webapp partially to address this need. Check it out.
Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Jon Wingfield [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 29, 2004 6:26 AM >To: Tomcat Users List >Subject: Re: Rewriting URLs in Tomcat > >sendRedirect(...) tells the browser to use a resource in a different >location. That location can be same webapp, different webapp, different >server. > >forward(...) is for the same server only. >In context: >servletContext.getRequestDispatcher(path).forward(...); >Out of context: >servletContext.getContext(foreignContextName).getRequestDispatcher(path ).fo >rward(...); > >For forwarding to a different context you have to have the relevant >permissions or the servletContext.getContext(foreignContextName) call >will return null. In tomcat the context doing the forwarding has to be >marked as crossContext: >http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html > > >Jon > >PS the chained invocations above are illustrative only, not as I would >normally code it ;) > >Jacob Weber wrote: > >> Tim Funk <[EMAIL PROTECTED]> wrote: >> >>>At http://funkman.home.comcast.net/ I have a project called ServletUtils. >>>You can use either RedirectFilter or ForwardFilter. They both can use >regex's. >> >> >> "Robert Harper" <[EMAIL PROTECTED]> wrote: >> >>>Have you tried the HttpServletResponse .sendRedirect( String url ) >method? >> >> >> >> Correct me if I'm wrong, but I think both of these approaches would >> require the URL I'm requesting to be part of the same application as the >> one I'm redirecting to. So, for example, I couldn't redirect from: >> >> http://www.myserver.com/first_app/path >> >> to >> >> http://www.myserver.com/second_app/path >> >> Or am I missing something? This is what I'm trying to do. >> Thanks, >> Jacob >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]