title: URL mappings not working properly in grails
body: <p>I am doing an application which is gTunes from the-definitive-guide-to-grails <a href="http://www.ebooksdig.com/pdf/the-definitive-guide-to-grails-2-32432.pdf" rel="nofollow">definitive-guide-to grails</a></p>
  
  <p>In that I used custom url to redirect to store controller which is </p>
  
  <pre><code>UrlMappings.groovy
  class UrlMappings {
  
      static mappings = {
          "/"(controller:"store")
  }
  }
  </code></pre>
  
  <p>so when I start the application it will to the default store controller
   and I have User domain class as well as UserController class which have actions register and login</p>
  
  <pre><code>User.groovy
  class User {
  String login
  String password
  ...
  }
  UserController.groovy
  class userController.groovy
  {
  def register(){
  ...}
  def login(){
  ..}
  
  StoreController.groovy
  class StroeController{
  def index(){
  ..}
  </code></pre>
  
  <p>The USerController have corresponding view pages under user/register.gsp and store/index.gsp
  the </p>
  
  <pre><code>store/index.gsp is
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/&gt;
  &lt;meta name="layout" content="main"/&gt;
  &lt;title&gt;gTunes Store&lt;/title&gt;
  &lt;/head&gt;
  &lt;body id="body"&gt;
  Your Online music store and storage service!
  &lt;p&gt;Manage your own library, browse music and purchase new tracks as
  they become available&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and I want to display the login page to entire application I placed login and password fields in main.gsp which is under </p>
  
  <pre><code>layouts/main.gsp
  main.gsp is
  &lt;g:form name="loginForm"  url="[controller:'user',action:'login']"&gt;
  Username:
   &lt;g:textField name="login"
   value="${fieldValue(bean:loginCmd, field:'login')}"&gt;
   &lt;/g:textField&gt;&lt;br&gt;
  Password:
   &lt;g:passwordField name="password"&gt;&lt;/g:passwordField&gt; 
   &lt;br/&gt;
   &lt;input type="image"
   src="${createLinkTo(dir:'images', file:'login-button.gif')}"
   name="loginButton" id="loginButton" border="0"&gt;&lt;/input&gt;
   &lt;/g:form&gt;
  &lt;g:link controller="user" action="register" &gt;Signup now&lt;/g:link&gt;
   to start your own personal Music collection!
  </code></pre>
  
  <p>the above main.gsp contains the form which have log in text field and password text field and a button and <strong>Its also contains a link tag which is used for registration process when I run the application the application goes to the store controller  default index page ,based on the default url mapping and this index page also contains the log in text field and password fields and log in button and it also contains registration link when I pressed log in button its working fine but when click the sign up link it do not going to the register page of the User controller even though the register.gsp and User controller contains the register action,but when I remove the "/"(controller:"store") code from url Mappings class then I executed the application the application showing the list of controllers I clicked on the Store controller its moving to its index page in that I clicked sign up link to register now the link working fine its going to the register gsp page of user controller but it was not working when I used above custom url mapping</strong>  </p>