#967 ✓invalid
omaroman

Controller.redirect doesn't work

Reported by omaroman | July 8th, 2011 @ 04:40 PM

Framework version: 1.2.2
Platform you're using: Fedora 15

Reproduction steps:

Details:
Invoking directly to static method Controller.redirect(some_url) doesn't work if the class that is invoking doesn't extends from play.mvc.Controller

Example:
public class UrlRedirector {

public static void redirectToAnyUrl() throws Throwable {
    play.mvc.Controller.redirect("www.meristation.com");
}

}

Comments and changes to this ticket

  • Julien Richard-Foy

    Julien Richard-Foy July 12th, 2011 @ 03:16 PM

    Only Controller subclasses are bytecode enhanced to make the redirection working. That’s because routing concerns should always happen in the controller layer.
    I don't think this issue is critical, just make your UrlRedirector class extend Controller.

  • Nicolas Leroux

    Nicolas Leroux October 18th, 2011 @ 03:50 PM

    • State changed from “new” to “invalid”
    • Assigned user set to “Nicolas Leroux”
  • ACMarketContact

    ACMarketContact December 22nd, 2018 @ 09:33 AM

    • Assigned user cleared.

    I don't think this issue is critical, just make your UrlRedirector class extend Controller. guide on how to download facetime on pc

  • Leah446

    Leah446 January 5th, 2019 @ 11:53 AM

    I checked the offlineStat. If it's true, I should redirect the controller to account controller. But, It doesn't work and I need to redirect to login action in account controller. Don't know where is the problem prepaidgiftbalance?

  • Declan333

    Declan333 March 10th, 2019 @ 01:46 PM

    If the code is not working then try to check the code because it is something missing at your end. I see the code on essay help uk which works really fine for me.

  • rrickey18

    rrickey18 March 22nd, 2019 @ 03:56 PM

    I have this code :

    public ActionResult Create() { if (dbcontext.SettingConfs.First().offlineState == "true") {

                TempData["Error"] = "ژمان ثبت نام به پایان رسیده است  ";
                RedirectToAction("login", "Account");
                return View();
    
            }
            else if (User.IsInRole("Admin"))
            {
                return View("Create");
    
            }
            else if (dbcontext.SettingConfs.First().offlineState == "true")
            {
                return View("Create");
            }
    
            else
            {
                return View();
            }
    
        }
    

    try this giftcardsite balance it may help you.

  • Kolmolm

    Kolmolm April 13th, 2019 @ 02:01 AM

    Sometimes it can occur because of malware on your system. That's not the most frequent case but it's better to check for it. But before choosing a program it's better to read reviews on antivirus software. Check a review on Vipre, for instance. I think it can be a decent option.

  • rrickey18

    rrickey18 May 14th, 2019 @ 06:20 PM

    I don't think this issue is critical, just make your UrlRedirector class extend Controller.

    Liteblue USPS login

  • rrickey18

    rrickey18 May 29th, 2019 @ 04:40 AM

    If the code is not working then try to check the code because it is something missing at your end. I see the code that which works really fine for me.
    I have also a website that wants to give detailed buying guides to wine cooler and wine fridges and this will become a wine cooler buying guide we will publish in our blog. You may like it.
    Check here; topwinecooler

  • rrickey18

    rrickey18 June 9th, 2019 @ 06:28 AM

    As you are searching shower water filter that removes Flouride and Improves your Skin and Hair then one product is rotting in my head and that is shower head lead filter
    Purchase it without any hesitation.

    #Special Features; TREATS YOUR DRY BRITTLE HAIR
    TREATS YOUR DRY ITCHY SKIN
    MAKES HAIR SHINE AND DULL SKIN GLOW
    REMOVES OTHER DANGEROUS CHEMICALS
    EASY TO INSTALL WITH LONG LASTING FILTERS

  • jahangirkhatri

    jahangirkhatri June 9th, 2019 @ 08:04 AM

    fresh cvv shop i was surfing net and thankfully came throughout this website and found intensely exciting stuff here. Its in endeavor of truth amusing to settlement. I enjoyed loads. thank you for sharing this super aspire.

  • jahangirkhatri

    jahangirkhatri June 16th, 2019 @ 03:41 PM

    first-rate article as quickly as remarkable idea!thank you for any such caustic article. I virtually respect for this invincible advice.. Situs judi online

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Referenced by

Pages