问题
Please give some suggestions...
Cache resources not working now just few days back it working. Same code same plugins, i found one deference compare to previous(while it working fine) , while shutdown the tomcat server. It is not shutting down itself, and giving some information in console like this:
INFO: SessionListener: contextDestroyed()
Apr 16, 2013 6:41:19 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-8080"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-8080"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]
Using:
Grails 2.1.4
Groovy 2.0.4
Java 1.7
Tomcat 7.0.37
Windows 7
========================
In Config.xml i added this code
grails.resources.debug = true
grails.resources.modules = {
'core' {
defaultBundle 'core-ui'
resource url: '/css/Company_base.css', attrs: [ media: 'screen' ]
resource url: '/css/cl.min.css', attrs: [ media: 'screen' ]
resource url: '/css/errors.css', attrs: [ media: 'screen' ]
resource url: '/css/jquery.multiselect.css', attrs: [ media: 'screen' ]
resource url: '/css/main.css', attrs: [ media: 'screen' ]
resource url: '/css/masterbrand.min.css', attrs: [ media: 'screen' ]
resource url: '/css/mcd.min.css', attrs: [ media: 'screen' ]
resource url: '/css/mobile.css', attrs: [ media: 'screen' ]
resource url: '/css/myapp.css', attrs: [ media: 'screen' ]
resource url: '/css/style.css', attrs: [ media: 'screen' ]
resource url: '/css/table.css', attrs: [ media: 'screen' ]
wrapper: { s -> "<!--[if lt IE 8]>$s<![endif]-->"
}
}
'ui' {
defaultBundle 'core-ui'
resource url: '/js/myapp.js', disposition: 'head'
}
}
In BuildConfig.xml, I added this code
runtime ":cache:1.0.1"
runtime ":cache-headers:1.1.5"
runtime ":cached-resources:1.0"
来源:https://stackoverflow.com/questions/16036263/grails-cache-resources-not-working