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 928411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:00:17+00:00 2026-05-15T20:00:17+00:00

I’m new to Grails (but not to Groovy or web development). I’m trying to

  • 0

I’m new to Grails (but not to Groovy or web development).

I’m trying to write a web app that accepts REST requests. The problem I have is that despite following – as far as I can tell – the documentation, I still receive 404s when hitting what I believe is the correct URL.

The details are as follows.

The project is brand-new (using Grails 1.3.3 and Intellij IDEA 9.0.3 which supports 1.3.3)

A very simple test controller:

package com.myproject

class TestController {

  def index = { }

  def list = {
    System.out.println("params = " + params);
  }

  def save = {
    System.out.println("params = " + params);
  }

}

and the equally URL mapping, attempting to map all GET requests to the controller’s list() method. According to the docs and the Grails in Action book, the “test” controller name in the mapping will be mapped to TestController.

class UrlMappings {

 static mappings = {

        "/test" (controller: "test") {
          action = [ GET: "list", POST: "save" ]
        }

 "/"(view:"/index")
 "500"(view:'/error')
}

}

The application is deployed (exploded) successfully in Tomcat6 in the myapp context (I have a static html in the root which I can display successfully).

Contents of apache-tomcat-6.0.28\webapps\myproject (if it matters) is included below. I stripped the non-essential stuff. The controller class is deployed, same for the UrlMappings class.

All HTTP requests to the following variations

http://localhost:8080/myproject/test/list
http://localhost:8080/myproject/test/list/
http://localhost:8080/myproject/test/
http://localhost:8080/myproject/test

return 404. Either is a weird bug or, more likely, a simple error to which I’m blind.

Your help is appreciated. Thank you!

|   index.html
|   mysql-connector-java-5.1.13-bin.jar
|   
\---WEB-INF
    |   applicationContext.xml
    |   sitemesh.xml
    |   
    +---classes
    |   |   BootStrap$_closure1.class
    |   |   BootStrap$_closure2.class
    |   |   BootStrap.class
    |   |   Config$_run_closure1.class
    |   |   Config$_run_closure1_closure3.class
    |   |   Config$_run_closure1_closure4.class
    |   |   Config$_run_closure1_closure5.class
    |   |   Config$_run_closure2.class
    |   |   Config.class
    |   |   resources$_run_closure1.class
    |   |   resources.class
    |   |   UrlMappings$__clinit__closure1.class
    |   |   UrlMappings$__clinit__closure1_closure2.class
    |   |   UrlMappings.class
    |   |   
    |   +---com
    |   |   \---myproject
    |   |           TestController$_closure1.class
    |   |           TestController$_closure2.class
    |   |           TestController$_closure3.class
    |   |           TestController.class
    |   |               
    |   \---org
    |       \---grails
    |           \---tomcat
    |                   ParentDelegatingClassLoader.class
    |                   SearchFirstURLClassLoader.class
    |                   TomcatLoader.class
    |                   TomcatServer$_preStart_closure3.class
    |                   TomcatServer$_preStart_closure3_closure5.class
    |                   TomcatServer$_start_closure1.class
    |                   TomcatServer$_start_closure1_closure4.class
    |                   TomcatServer$_start_closure2.class
    |                   TomcatServer.class
    |                   TomcatServerFactory.class
    |                   
    +---lib
    |       catalina-ant.jar
    |       grails-tomcat-plugin-1.0.jar
    |       jasper-jdt.jar
    |       mysql-connector-java-5.1.13-bin.jar
    |       tomcat-dbcp.jar
    |       tomcat-jasper.jar
    |       tomcat-juli-adapters.jar
    |       tomcat-juli.jar
    |       
    \---tld
            grails.tld
            spring.tld
  • 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-15T20:00:17+00:00Added an answer on May 15, 2026 at 8:00 pm

    it is returning a 404 error because there is no view associated with any of the actions.

    there is nothing for the application to render…

    change your controller code

    class TestController {
    
      def index = { }
    
      def list = {
        render("params = " + params);
      }
    
      def save = {
        render("params = " + params);
      }
    
    }
    

    you will see some output

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I am writing an app with both english and french support. The app requests
I'm trying to create an if statement in PHP that prevents a single post
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

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.