My goal is to have a link on the page that returns the user to the originating site.I am starting from the spring saml sample http://projects.spring.io/spring-security-saml/ and am adding a new function to the index page.
my saml-servlet.xml and securityContext.xml both have
<context:component-scan base-package="com.home.saml.sp"/>
my returnController.java in the package com.home.saml.sp
@Controller
public class ReturnController {
@RequestMapping(value = "/redirect", method = RequestMethod.POST)
public String redirect() {
String redirectUrl = "http://www.home.com";
return "redirect:"+ redirectUrl;
}
}
and my index.jsp adds
<form method="POST" action="/redirect">
<table>
<tr>
<td><input type="submit" value="Redirect * Page" /></td>
</tr>
</table>
</form>