Monday, May 22, 2006

JSP Forward - Not Forwarding Request

Had a problem with JSP:Forward. It seemed like it was not forwarding the request. The problem was an attempt to the forward to a directory like this:

www.website.com/directory/

instead of an actual page like this:

www.website.com/directory/index.jsp

When forwarding to the directory, due to the configuration of the web server, once the request hit the directory the web server would then redirect to the directory default page (index.jsp) and the request was lost during the redirect.

By changing the forward to the full page: /directory/index.jsp it worked.