After receiving a SAML response, the browser is redirected to an incorrect URL. Check whether the relay state is URL encoded. To fix this issue, add the following entries in the web.xml file:
<context-param> <param-name>decodeRelayStateParam</param-name> <param-value>true</param-value> </context-param>
The web.xmlfile is available in the /var/opt/novell/tomcat5/webapps/nidp/WEB-INF/folder.