File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes Grails/STS with Eclipse -- installation help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Grails/STS with Eclipse -- installation help" Watch "Grails/STS with Eclipse -- installation help" New topic

Grails/STS with Eclipse -- installation help

Kenn Cowling

Joined: Mar 21, 2012
Posts: 8

I'm new here, so forgive me if I've posted in the wrong forum.

I am a Java greenhorn: about three years of core Java development with a smidge of Swing. I may have an opportunity to work with Groovy on Grails and want to get a head start by working with it at home, beginning with the basic tutorials.

I now have Eclipse EE on my home PC. It was easy enough to find instructions for downloading and installing SpringSource Tool Suite and Grails, however I'm unsure of what else is needed. Should I install a DB such as MySQL? Do I also need a webserver, and if so, which one? I installed Tomcat 7 on a work PC and got it to work well enough with Eclipse (so I could tinker with JSP), but an acquaintance suggested Glassfish instead.

Also, is there a preferred order of installation? For example DB first, then webserver, then STS, then Grails? The same acquaintance mentioned that he'd encountered some serious problems with his own PC when switching between DBs and webservers. So, I'd like to avoid potential pitfalls (or am I worrying too much?)

Thanks in advance for any hints and suggestions.

(Edit to remove unnecessary info)
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3152

As such Grails comes with an embedded Tomcat container and embedded db which can be used for development. There should be an option to generate the war and deploy to some other container. Same goes with db- you can configure to use another db. The good thing is that Grails supports different configuration for development/production/test, so you can configure the db as required for each setup.

I am not sure which one is better among Glassfish/Tomcat, but if you are planning to deploy the application to some cloud service then you would be bound to the container which they provide. And the order in which you install db, web container doesnt matter.

There shouldnt be a problem as such when switching the db, because the ORM insulates your application from the underlying db, so if you want to switch the db, you just have to update the db configuration in your grails app. And as far as switching the container is concerned then you can use any container which supports war deployment.

I would suggest you try with the stack which comes with Grails (using the embedded Tomcat and embedded db), I dont think you would even need Eclipse/STS for a quick grails application or may be to learn. Once you are quite familiar you can always look for tutorials on how to deploy to other containers or how to use other db.

And welcome to Coderanch!

Mohamed Sanaulla | My Blog
Kenn Cowling

Joined: Mar 21, 2012
Posts: 8

Thank you for the welcome and the information, Mohamed. At this point I don't need to worry about deployment, I just want to start with basic tutorials. Thank you for confirming that I can get going without having to worry about adding a db or container. If/when I get to use Grails I believe the dev environment will be set up with STS and Eclipse, however I will take your advice and begin with just Grails... that's the way the Grails tutorial is written, and I might as well keep things as simple as possible at first, I can always link with STS/Eclipse later. Thanks again!
chris webster

Joined: Mar 01, 2009
Posts: 2289

Have a look at how to integrate Grails and STS.

No more Blub for me, thank you, Vicar.
I agree. Here's the link:
subject: Grails/STS with Eclipse -- installation help
It's not a secret anymore!