I turned on extra logging and it does look like the grails servlet is still having an effect.
Here is the stack trace for the sample batch admin project when the jobs page is rendered correctly:
Code:
15:04:59,191 DEBUG tomcat-http--5 datasource.DataSourceUtils:110 - Fetching JDBC Connection from DataSource
15:04:59,192 DEBUG tomcat-http--5 datasource.DataSourceUtils:332 - Returning JDBC Connection to DataSource
15:04:59,193 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'body' of type [java.lang.String] to request in view with name 'jobs'
15:04:59,194 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'titleText' of type [java.lang.String] to request in view with name 'jobs'
15:04:59,194 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'jobs' of type [java.util.ArrayList] to request in view with name 'jobs'
15:04:59,194 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'titleCode' of type [java.lang.String] to request in view with name 'jobs'
15:04:59,195 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'totalJobs' of type [java.lang.Integer] to request in view with name 'jobs'
15:04:59,195 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'endJob' of type [java.lang.Integer] to request in view with name 'jobs'
15:04:59,196 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'startJob' of type [java.lang.Integer] to request in view with name 'jobs'
15:04:59,196 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'springMacroRequestContext' of type [org.springframework.web.servlet.support.RequestContext] to request in view with name 'jobs'
15:04:59,196 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'jobName' of type [java.lang.String] to request in view with name 'jobs'
15:04:59,197 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:328 - Added model object 'servletPath' of type [java.lang.String] to request in view with name 'jobs'
15:04:59,197 DEBUG tomcat-http--5 freemarker.AjaxFreeMarkerView:279 - Rendering FreeMarker template [/layouts/html/standard.ftl] in FreeMarkerView 'jobs'
And here is the output from myapp when I try to access the jobs page. Note that the Freemarker output is looking for a view with name 'null' now instead of a view with name 'jobs':
Code:
2012-12-04 14:57:57,182 ["http-bio-8080"-exec-4] DEBUG datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
2012-12-04 14:57:57,185 ["http-bio-8080"-exec-4] DEBUG datasource.DataSourceUtils - Returning JDBC Connection to DataSource
2012-12-04 14:57:57,203 ["http-bio-8080"-exec-4] DEBUG servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.JstlView: unnamed; URL [/WEB-INF/grails-app/views//jobs.jsp]] in DispatcherServlet with name 'Batch Servlet'
2012-12-04 14:57:57,204 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Added model object 'jobs' of type [java.util.ArrayList] to request in view with name 'null'
2012-12-04 14:57:57,204 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Added model object 'totalJobs' of type [java.lang.Integer] to request in view with name 'null'
2012-12-04 14:57:57,204 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Added model object 'jobName' of type [java.lang.String] to request in view with name 'null'
2012-12-04 14:57:57,204 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Added model object 'endJob' of type [java.lang.Integer] to request in view with name 'null'
2012-12-04 14:57:57,204 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Added model object 'startJob' of type [java.lang.Integer] to request in view with name 'null'
2012-12-04 14:57:57,209 ["http-bio-8080"-exec-4] DEBUG view.JstlView - Forwarding to resource [/WEB-INF/grails-app/views//jobs.jsp] in InternalResourceView 'null'
2012-12-04 14:57:57,212 ["http-bio-8080"-exec-4] DEBUG support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'pluginManager'
2012-12-04 14:57:57,212 ["http-bio-8080"-exec-4] DEBUG support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'grailsApplication'
2012-12-04 14:57:57,214 ["http-bio-8080"-exec-4] DEBUG annotation.RequestMappingHandlerMapping - Looking up handler method for path /WEB-INF/grails-app/views/jobs.jsp
2012-12-04 14:57:57,214 ["http-bio-8080"-exec-4] DEBUG annotation.RequestMappingHandlerMapping - Did not find handler method for [/WEB-INF/grails-app/views/jobs.jsp]
2012-12-04 14:57:57,214 ["http-bio-8080"-exec-4] WARN servlet.PageNotFound - No mapping found for HTTP request with URI [/myapp/WEB-INF/grails-app/views/jobs.jsp] in DispatcherServlet with name 'grails'
2012-12-04 14:57:57,215 ["http-bio-8080"-exec-4] DEBUG servlet.DispatcherServlet - Successfully completed request
It is trying to render /WEB-INF/grails-app/views/jobs.jsp (even tho the servlet mentioned is the Batch Servlet and not the grails one) instead of the normal jobs.ftl freemarker layout page.
I think I'm close to giving up on this. Btw, I also explicitly added freemarker version 2.3.19 to my buildconfig but no dice.
Tony