Greg's Blog

helping me remember what I figure out

Deploying Grails Webapp to Jetty - Resolving a Few Issues...

| Comments

So you have deployed your app and can access the start page of your grails app. If you are like me deploying your app to a Debian\Jetty type of configuration you might come across the following error: [code]java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config [/code] When trying to access a controller from the default start page. I traced this to a missing dependency in grails (I use SpringSource Tool Suite for development so that maybe the root cause). By opening and editing your /project/grails-app/conf/(default package)/BuildConfig.groovy, add the following under grails.project.dependency.resolution. [code]grails.project.dependency.resolution = { … dependencies { // specify dependencies here under either ‘build’, ‘compile’, ‘runtime’, ‘test’ or ‘provided’ scopes eg. runtime “javax.servlet:jstl:1.1.2” // runtime ‘mysql:mysql-connector-java:5.1.5’ } }[/code] Build your war and re-deploy. Still getting an error?? I was. For jetty there was still an issue with calling the controller. After spending some time exploring, it looks like Jetty support was removed from Grails 1.2. I stumbled across a post mentioning installing the grails Jetty plugin with: [code]. grails install-plugin jetty[/code] After running this, and re-building my war file and re-deploying it one final time, bingo it all worked.