I have a servlet that functions as a frontend to a digital object repository. Requests to the servlet are in the form of encoded URLs that pass the necessary repository query arguments as parameters. Once the query has been resolved by the servlet, the URL obtained from the repository is then redirected back to the browser using sendRedirect(). This all works nicely, but I would like for the URL that gets displayed in the browser Location Window to be that of the initial URL request and not the redirected URL obtained from the repository. i.e., I would like to "hide" the redirected URL so the URL that gets displayed/bookmarked is the initial URL request. Does anyone know if something like this is possible and if so, how it might be accomplished? Can this be accomplished soley within the servlet API or will it require writing a special module for apache to handle this type of redirect. I'm running tomcat 4.0 Thanks in advance for any pointers you may have...
posted 14 years ago
Use RequestDispatcher forward() method to accomplish this goal.
removed wholesale quote. - MC [ January 22, 2002: Message edited by: Mike Curwen ]