|
|
|
[
Permlink
| « Hide
]
Graeme Rocher - 29/Mar/07 07:22 AM
implemented a fix. Appears to work on local tomcat 5.5.28
Works on my local tomcat 5.0.27 as well! Thanks alot!
Maybe I was a little fast ...
I'm sure it was working, but now it doesn't any more! I tried a war in 5.0.28, 5.5.23 and 6.0.10 and the redirect did not work. I installed the latest snapshot and created a new application. Again, the redirect() did not work in Tomcat! Can you try again locally? I checked out latest from trunk and build Grails myself.
I wrote a shell script that
On all my Tomat versions on Windows & Linux, redirect() didn't work. So I'm afraid you'll have to reopen this issue. Doesn't work in Glassfish V2 Milestone 4 either. Couldn't get the application to run at all under Resin 3.1, but that seems to be an unrelated issue
I think the priority should be raised to "Blocker". Same here – apparently – I tried deploying to Jetty 6.1, and any actions that do redirects results in the browser just sitting there, churning along indefinitely without ever reaching the destination page/view/action. Using a 0.5-SNAPSHOT from this morning. I wished I could confirm this, but here I still don't see redirect() working with Tomcat ...
Can you please attache a test case. It works locally for me.
Ok, I just saw that while fiddling around to find the cause of this problem, I replaced the redirect() with chain() in my test script.
Using redirect(), it indeed works here for me, too! But shouldn't chain() work as well? I mean, isn't redirect(action:'otheraction') and chain(action:'otheraction') basically the same, ignoring that chain() can also pass model data around? They call different code, I'll look into chain too and fix it
OK - I think I see what's going on w/ jetty 6.1.1 now: it's as if both 'redirects()' and 'chains()' are just simply being ignored/discarded; instead what happens is the action will just do the default render gsp. So: // UserController.groovy
def home = {
redirect( controller: 'site', action: 'list' )
}
doesn't actually redirect to the list action of SiteController, what it does is attempt to render .../views/user/home.gsp ( of course when home.gsp doesn't exist, then I get a: HTTP ERROR: 500 /WEB-INF/grails-app/views/user/home.jsp Ok i've put in some new code that changes quite a few things, I haven't tested it against Jetty 6, but believe it will work, could you test again? Michael could you also re-test for you, it works on my local tomcat 5.5.28, on glassfish and jetty
Cheers Also note this should hopefully also correct the chain method
Works for me on local Tomcat 6.0.7 and production Tomcat 6.0.10
Both redirect() and chain() work on
Tomcat 5.0.28 |
||||||||||||||||||||||||||||||||||||||||||||