Hi,

Just out of curiosity, can anyone explain why it is that I have to set the
request to null to prevent our login page from being displayed twice?

Here's the setup:
Client makes a request for a page in the /client directory, a filter is
invoked on the request looking for a 'userSession' session attribute, if
it's not there, the requestURI is stashed in a session attribute and control
is forwarded to the /login/index.jsp page.  As an aside, I put a line in to
output to the console when the forward happens, and it's only printed out
once per request in either of the following cases.

If I forward like this:
getFilterConfig().getServletContext().getRequestDispatcher("/login/index.jsp
").forward(request,response);
I get the login page displayed twice in the browser (which strikes me as
weird... two complete copies in one browser).

Whereas if I do this:
getFilterConfig().getServletContext().getRequestDispatcher("/login/index.jsp
").forward(null,response);
it works like you'd expect.

As I said, we've got it working, but I'm curious what this is about.  Thanks
for any insight.

Rian
--
Rian Schmidt
[EMAIL PROTECTED]



Reply via email to