I am following Scott Davis' tutorials on developing grails applications, but whenever i attempt to operate my application (or indeed his source code) i recieve "Opera has detected the server is redirecting the request this address in ways which will never complete." Safari provides a similar error message along with Opera.

As i have examined the initial authors source code which provides exactly the same error i am fairly confident it's nothing related to the code.

Is an issue with the net server on my small machine? I personally use Mac OS Snow Leopard so i am presuming it's apache that's producing this error.

Edit: Appears Grails as standard uses Jetty, so most likely not Apache that's leading to the issue. However also examined the application on Glassfish and that i obtain the same error.

Anybody understand what i'm able to do in order to fix this?


It is dependent around the code and Apache configuration you're using. I suppose the web server transmits cyclic HTTP redirections, eg. from /root/ to /root (with no slash) and the other way around. This will cause a redirection infinite loop.

Look at your configuration on problems that result in a HTTP redirect. For instance, Apache instantly adds slashes to directory Web addresses in standard configuration (such as the /root/ example above). I'm not sure Grails, and so i cannot provide you with a hint how Web addresses are processed inside the application.

You may also use manual HTTP demands for debugging to determine what is happening behind the curtain, using telnet on the terminal:

$ telnet localhost 80
GET / HTTP/1.0

I suppose the response is going to be something of that nature:

HTTP/1.0 302 Found
Location: XXX

Now perform a second request around the URL passed within the Location header and so forth.

I had been obtaining the same error a while ago, heres the way i fixed:

  1. Try exactly the same page on the different internet setup (it may be your Web service provider)
  2. Open Safari, Opera or whatever your using and empty the cache and remove All of your snacks
  3. Reboot your pc and check out again

It might work now, but when it does not:

  1. open Opera and kind 'about:config' (with no quotes) in to the URL bar
  2. You're going to get some little warning, just press OK
  3. Type 'redirect' in to the Filter box
  4. You need to visit a listing for 'network.http.redirection-limit'
  5. Double click on the listing and kind a significant number (anything above 50 minimizing than 200)
  6. Press OK, quit and re-open Opera

Essentially everything does is make FireFox's tolerance for redirect loops greater that ought to fix your condition - truly, just borrowing another person's web connection fixes it

Hope that helps =)

Just check carefully your URLMappings configuration:


Common situation:

You set up request to become handled such as this:

"/anything" (controller:"someController")

So without action, request is going to be handled automatically one, "index". "index" action usually redirects to "list", and "list", in some instances redirect to "index"

There's your loop.

Best of luck