I have two URLs to map:
The root : http://www.website.com
: When user request the root I want to show the home page.
The root with parameter: http://www.website.com?ref=xxxx
: When user requests this, I want to create a cookie and go to the root ("/").
Here is my controller:
@RequestMapping(value="/",method=RequestMethod.GET)
public String doGreatThings(
@RequestParam(value="ref", required=false) String identifier,
ServletRequest request,
ServletResponse response){
if(identifier!=null){
}
return "/";
}
This gives me an infinite loop. Is it possible to distinguish between both mappings in the controller?
http://www.mywebsite.com
vs.
http://www.mywebsite.com?ref=xxxxx