6 messages in org.codehaus.grails.userRe: [grails-user] [grails-users] depl...| From | Sent On | Attachments |
|---|---|---|
| Johan Chaves Saborío | 11 Sep 2007 19:17 | |
| wouters | 11 Sep 2007 22:54 | |
| Graeme Rocher | 12 Sep 2007 00:05 | |
| wouters | 12 Sep 2007 00:52 | |
| Johan Chaves Saborío | 22 Sep 2007 17:49 | |
| wouters | 23 Sep 2007 23:00 |
| Subject: | Re: [grails-user] [grails-users] deploying grails application in Websphere 5.X![]() |
|---|---|
| From: | wouters (wsch...@gmail.com) |
| Date: | 09/12/2007 12:52:34 AM |
| List: | org.codehaus.grails.user |
This workaround introduces a little overhead when upgrading grails. We added two files to scripts/ War23.groovy and Package23.groovy. We also needed to exclude a few jars from the war, so we basically duplicated the entire war task with the added EXCLUDES functionality. The Package23.groovy contains the workaround for the web.xml, and is used by War23 instead of the original Package.groovy effectively overriding the generateWebXml task with one that fixes the generated web.xml. This means that when upgrading grails these tasks should be aligned with the latest and greatest originals.
now calling: $ grails -Dservlet.version=2.3 prod war23
creates a war file that deploys in websphere (given that the other websphereisms noted on the grails website are taken into account, we use PARENT_LAST classloading).
The attached versions of the scripts are based on grails 0.5.6 and may need some tweaking for 0.6. It is not an ideal solution, but it works.
IIRC there is some code in grails that generates the web.xml which could be easily adapted to take the servlet.version into account, so that this workaround is no longer necessary. i never got around to patching it and creating an issue (we have an acceptable workaround).
HTH, wouter
graemer wrote:
Can you post your code, for the benefit of other users?
Cheers
On 9/12/07, wouters <wsch...@gmail.com> wrote:
hi,
i think you can run with: -Dservlet.version=2.3 but, in 0.5.5, this still did not generate a deployable war for websphere 5.1. we had to create an alternative generateWebXml task (from Package.groovy) to 'fix' the web.xml. (Remove namespace declaration, and add 2.3 DOCTYPE). I think the namespace declaration, at least for 0.5.5, is hardcoded in the code that generates the web.xml, and ignores the servlet.version setting. websphere 5.1 chokes on this.
HTH, wouter
Johan Chaves Saborío wrote:
How can I deploy a grails war into a websphere 5.x server. The problem I'm having is that grails generates the web.xml based on the servlet 2.4 api, but websphere is trying to use the servlet 2.3 api.
Is there any way to create the grails application with the servlet 2.3 api?
-- View this message in context: http://www.nabble.com/-grails-users--deploying-grails-application-in-Websphere-5.X-tf4426582.html#a12629142 Sent from the grails - user mailing list archive at Nabble.com.
--------------------------------------------------------------------- To unsubscribe from this list please visit:
-- Graeme Rocher Grails Project Lead http://grails.org
--------------------------------------------------------------------- To unsubscribe from this list please visit:
http://www.nabble.com/file/p12630450/Package23.groovy Package23.groovy
http://www.nabble.com/file/p12630450/War23.groovy War23.groovy
--
View this message in context:
http://www.nabble.com/-grails-users--deploying-grails-application-in-Websphere-5.X-tf4426582.html#a12630450
Sent from the grails - user mailing list archive at Nabble.com.




