Risser
Risser

Reputation: 585

Grails Helloworld tutorial app not working

I feel guilty coming to Stack Exchange with such a trivial issue, but I've been banging my head against it all morning and can't seem to get anywhere. I am trying to run the simple HelloWorld app in the Grails tutorial: http://grails.org/doc/latest/guide/gettingStarted.html#creatingAnApplication

I have Grails installed, I can run it, create the controller and everything, but no matter what page I hit, I get nothing but a blank. Even pages that don't exist, return a blank page and not an error.

For example, I tried http: //localhost:8080/helloworld, obviously, and get nothing but a blank page back. The same thing happens for http: //localhost:8080/hellowrld, http: //localhost:8080/helphelphelp and http: //localhost:8080/pleasefortheloveofpeteworkalready. Always the empty response.

When I try a different port, I get an error. When I stop-app and try, I get an error. When I run grails run-app with port 9090 and try port 8080, I get an error, but on 9090, I get the blank page. So, I assume the server is fielding the requests, but just isn't responding for some reason.

I'm probably missing something super simple, something dumb, but I can't figure out what it is, and the complete lack of feedback is killing me.

Are there logs anywhere I can check? And, is there something obvious I'm missing?

(PS: I assume the environment vars are correct, because I can run Grails no problem. Also, I installed, but never ran, the GGST IDE thing. I rebooted since then, but could that have installed some service that's taking over?)

Thanks, Peter

Upvotes: 3

Views: 1550

Answers (1)

Burt Beckwith
Burt Beckwith

Reputation: 75671

The application name is the default "context", so if you create an application called foo (grails create-app foo) it will be available at http://localhost:8080/foo if you run grails run-app. You can use a different port, for example 9090, by running grails -Dserver.port=9090 run-app and you can also use a different context (or none at all).

The run-app script displays the full URL of the application in the output window - you should see something like:

Server running. Browse to http://localhost:8080/helloworld

Upvotes: 4

Related Questions