Hi,
I am trying to write a page to redirect requests not from a particular source. The source is an login page in another server to perform LDAP authentication. If the request was posted from anywhere else, the page would redirect it to the login page. The section of the code is listed below
Will cause a illegal state exception while:
will work fine.
My question is why? An yes, I know a better approach will be to use a front controller or a filter. Would any body have code for a filter like this ready (including the web.xml) for this simple task.
Thanks all for helping or attempt to help me in advance