Discussion:
Grails 2.4.0 and Servlet API version
Adarsh
2014-05-09 09:56:34 UTC
Permalink
Hi guys,

Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.

I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar

Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?

Regards,
Adarsh
Graeme Rocher
2014-05-09 13:54:47 UTC
Permalink
You can create a Servlet API 3.1 application by using the Tomcat 8 plugin:

http://grails.org/plugin/tomcat8

And definition the following dependencies block:

dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}

It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers

Cheers
Post by Adarsh
Hi guys,
Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.
I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar
Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?
Regards,
Adarsh
--
Graeme Rocher
Grails Project Lead
SpringSource

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Adarsh
2014-05-09 14:39:44 UTC
Permalink
Tried that with no luck. Tomcat8 plugin is loaded as a dependency. So is
the new Cache 1.1.6 plugin. However, when I do a run-app, Grails looks for
web3.1.template.xml and fails.

| Error Error executing script RunApp: java.io.FileNotFoundException:
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory) (NOTE: Stack trace has been filtered. Use
--verbose to see entire trace.)
java.io.FileNotFoundException:
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory)
at _GrailsPackage$_run_closure5.doCall(_GrailsPackage.groovy:74)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at
org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Graeme Rocher
http://grails.org/plugin/tomcat8
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers
Cheers
Post by Adarsh
Hi guys,
Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.
I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar
Post by Adarsh
Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?
Regards,
Adarsh
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Graeme Rocher
2014-05-09 19:43:56 UTC
Permalink
You can use the 3.0 template instead, don't bother setting
servlet.version to 3.1
Tried that with no luck. Tomcat8 plugin is loaded as a dependency. So is the
new Cache 1.1.6 plugin. However, when I do a run-app, Grails looks for
web3.1.template.xml and fails.
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory) (NOTE: Stack trace has been filtered. Use
--verbose to see entire trace.)
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory)
at _GrailsPackage$_run_closure5.doCall(_GrailsPackage.groovy:74)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at
org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Graeme Rocher
http://grails.org/plugin/tomcat8
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers
Cheers
Post by Adarsh
Hi guys,
Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.
I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar
Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?
Regards,
Adarsh
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Adarsh
2014-05-09 20:11:41 UTC
Permalink
Well, I could. But the reason I am asking this question is because I am
working on the patches for the Grails Jetty plugin. I have already
submitted one for Jetty 9.0 which caters to Servlet 3.0 API. This question
in particular was regarding the Jetty 9.1 version of the same plugin which
should support up to Servlet API 3.1.

So it was more in the interest of the people who might use Jetty 9.1 plugin
and expect features of Servlet API 3.1 in their applications. However, I do
not know if just changing the template back to 3.0 would still make the
container work properly in Servlet API 3.1.

Regards,
Adarsh
Post by Graeme Rocher
You can use the 3.0 template instead, don't bother setting
servlet.version to 3.1
Post by Adarsh
Tried that with no luck. Tomcat8 plugin is loaded as a dependency. So is
the
Post by Adarsh
new Cache 1.1.6 plugin. However, when I do a run-app, Grails looks for
web3.1.template.xml and fails.
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
Post by Adarsh
(No such file or directory) (NOTE: Stack trace has been filtered. Use
--verbose to see entire trace.)
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
Post by Adarsh
(No such file or directory)
at _GrailsPackage$_run_closure5.doCall(_GrailsPackage.groovy:74)
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
Post by Adarsh
at
org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
Post by Adarsh
at
org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
Post by Adarsh
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Adarsh
Post by Graeme Rocher
You can create a Servlet API 3.1 application by using the Tomcat 8
http://grails.org/plugin/tomcat8
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers
Cheers
Post by Adarsh
Hi guys,
Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.
I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?
Regards,
Adarsh
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Graeme Rocher
2014-05-09 20:45:47 UTC
Permalink
I don't see why changing it back wouldn't work. Ultimately the
important thing is having the right classes on your classpath, which
you get by adding the tomcat8 plugin and servlet 3.1 jar file
Post by Adarsh
Well, I could. But the reason I am asking this question is because I am
working on the patches for the Grails Jetty plugin. I have already submitted
one for Jetty 9.0 which caters to Servlet 3.0 API. This question in
particular was regarding the Jetty 9.1 version of the same plugin which
should support up to Servlet API 3.1.
So it was more in the interest of the people who might use Jetty 9.1 plugin
and expect features of Servlet API 3.1 in their applications. However, I do
not know if just changing the template back to 3.0 would still make the
container work properly in Servlet API 3.1.
Regards,
Adarsh
Post by Graeme Rocher
You can use the 3.0 template instead, don't bother setting
servlet.version to 3.1
Tried that with no luck. Tomcat8 plugin is loaded as a dependency. So is the
new Cache 1.1.6 plugin. However, when I do a run-app, Grails looks for
web3.1.template.xml and fails.
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory) (NOTE: Stack trace has been filtered. Use
--verbose to see entire trace.)
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
(No such file or directory)
at _GrailsPackage$_run_closure5.doCall(_GrailsPackage.groovy:74)
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at
org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at
org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Graeme Rocher
http://grails.org/plugin/tomcat8
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers
Cheers
Post by Adarsh
Hi guys,
Just noticed that Grails 2.4.0 (RC1) brings with it Servlet API 3.0.1.
I use GVM and found the old JAR file under
~/.gvm/grails/2.4.0.RC1/lib/javax.servlet/javax.servlet-api/jars/javax.servlet-api-3.0.1.jar
Is this intentional and if so, when is Servlet API 3.1 proposed to be
integrated with Grails?
Regards,
Adarsh
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Adarsh
2014-05-09 21:10:21 UTC
Permalink
No I do agree it would work. I guess I misunderstood the point of the web
template XML. It now looks like it is just used to generate a starting
web.xml which one can customise later on.

Anyway, I have created a Jira ticket for this. I think the fix too would be
to simply copy the 3.0 template into a 3.1 one. I will leave it to your
better judgement whether to keep this issue open or close it down.

For now however, I will do as you suggested and not set the Servlet API
version in my BuildConfig.groovy.

Thanks for your help.

Regards,
Adarsh
Post by Graeme Rocher
I don't see why changing it back wouldn't work. Ultimately the
important thing is having the right classes on your classpath, which
you get by adding the tomcat8 plugin and servlet 3.1 jar file
Post by Adarsh
Well, I could. But the reason I am asking this question is because I am
working on the patches for the Grails Jetty plugin. I have already
submitted
Post by Adarsh
one for Jetty 9.0 which caters to Servlet 3.0 API. This question in
particular was regarding the Jetty 9.1 version of the same plugin which
should support up to Servlet API 3.1.
So it was more in the interest of the people who might use Jetty 9.1
plugin
Post by Adarsh
and expect features of Servlet API 3.1 in their applications. However, I
do
Post by Adarsh
not know if just changing the template back to 3.0 would still make the
container work properly in Servlet API 3.1.
Regards,
Adarsh
Post by Graeme Rocher
You can use the 3.0 template instead, don't bother setting
servlet.version to 3.1
Post by Adarsh
Tried that with no luck. Tomcat8 plugin is loaded as a dependency. So
is
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
the
new Cache 1.1.6 plugin. However, when I do a run-app, Grails looks for
web3.1.template.xml and fails.
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
(No such file or directory) (NOTE: Stack trace has been filtered. Use
--verbose to see entire trace.)
/home/adarsh/.gvm/grails/2.4.0.RC1/grails-resources/src/war/WEB-INF/web3.1.template.xml
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
(No such file or directory)
at _GrailsPackage$_run_closure5.doCall(_GrailsPackage.groovy:74)
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
at
org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at
org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
at
org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
Post by Adarsh
Post by Graeme Rocher
Post by Adarsh
at
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
Post by Graeme Rocher
http://grails.org/plugin/tomcat8
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
It isn't the default yet because most people are still deploying to
Tomcat 7 (Servlet 3.0) containers
Cheers
On Fri, May 9, 2014 at 11:56 AM, Adarsh <a
Loading...