user1258361
user1258361

Reputation: 1133

What's the simplest way to deploy a Grails-generated WAR file?

I've been having persistent problems (for several weeks) getting Tomcat to deploy a WAR file. I'm looking for a simple server. It does not need to have a lot of functionality-it just needs to be simple to set up. In particular I'm looking for a program that I can just drop a WAR file into and have the enclosed web application launch.

Upvotes: 3

Views: 1161

Answers (4)

RichB
RichB

Reputation: 21

I recently had a similar problem where my app ran fine with "grails run-app" but not as a war file. It was caused by a missing "package" line in one of the files. I was getting 404 errors. When a war file is unpacked on the server it doesn't put files in the same directory locations as when the are in the grails environment. Not sure this will help you but maybe others with similar problems.

Upvotes: 2

dbrin
dbrin

Reputation: 15673

if you get a fresh tomcat instance, generate a hellow world app and generate your war file via grails dev war it should work without a hitch. typically problems arise form adding dependencies that clash with server libs.

if you want to give other servers a try I would suggest resin as one of the easiest to setup, run and maintain.

Upvotes: 1

Bozho
Bozho

Reputation: 597402

If your application does not start on tomcat, it almost certainly means it won't start on any servlet container - containers implement a spec, and are very similar in many aspects.

What you should do is go and hunt each problem one by one, until the application starts. The problem is the app, not the container.

Upvotes: 3

Tomas Lin
Tomas Lin

Reputation: 3532

You might want to give jetty runner a try. It basically just uses an embedded jetty instance to run your war file.

http://blogs.webtide.com/janb/entry/jetty_runner

It is available on Maven and it is in fact how heroku apps built with grails are ran. http://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner

Upvotes: 3

Related Questions