HtmlUnit will raise that after 20 complete redirect loops, i.e. visiting exactly the same URL 20 times. If the URL shown in the exception points to your servers, I would strongly suspect that the problem is in the server application.
In any case, you can handle the exception however you like with 'rescue'.
|