Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4272628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:36:12+00:00 2026-05-21T07:36:12+00:00

The situation: Say I have an example controller called AccountController with some actions of

  • 0

The situation:

Say I have an example controller called AccountController with some actions of show, edit and update.

In the Grails URL Mappings I am trying to map by method type e.g. GET POST etc etc

Then I have a link that points to the controllers corresponding action like so:

<g:link controller="account" action="edit">Edit my account link</g:link>

with the mappings of:

"/profile"      (controller: "account", action: "show")
"/profile/edit" (controller: "account", action: [GET: "edit", POST: "update"])

the problem here is the link that is generated should be using the mappings for lookups and making it look like so “/profile/edit” in the generated html page but instead the page has “/account/edit” which according to the mappings don’t exist so just causes an error when clicked.

I have even tried the alternative syntax of:

"/profile/edit" (controller: "account") { action = [GET: "edit", POST: "update"] }

but it still points to a url mapping that does not exist.

Is this a bug or just me having a bad day?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:36:12+00:00Added an answer on May 21, 2026 at 7:36 am

    I don’t know if this (reverse URL mappings with HTTP methods) was working in previous versions of Grails, but I have reproduced your problem here in 1.3.7 and the only solution I came up with was to use named URL mappings. Using it, your tag would be:

    <g:link controller="account" action="edit" mapping="profileEditing">
        Edit my account link
    </g:link>
    

    and the edit mapping would be:

    name profileEditing: "/profile/edit" (controller: "account") {
        action = [GET: "edit", POST: "update"]
    }
    

    Regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hypothetical situation: let's say I have a 3rd party .net assembly being used in
A general architecture question in Sitecore 6... Let’s say we have a situation where
I'm trying to determine what situations MySQL updates an index. Say I have the
Is it right to use a private constant in the following situation: Say I
Say I'm extending a TextBox called CustomTextBox in .net. In certain situations I would
Situation: I have a simple XML document that contains image information. I need to
Situation: A PHP application with multiple installable modules creates a new table in database
Situation: text: a string R: a regex that matches part of the string. This
Situation: you've got a .swf embedded in an html page, and when you click
Situation: Site with content protected by username/password (not all controlled since they can be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.