Hi Charlie,
I just tried adding a src/main/webapp/META-INF/context.xml with following content: <?xml version="1.0" encoding="UTF-8"?> <Context path="/my-ui"/> It did not get copied to target/tomcat/conf/gwt/localhost/ROOT.xml unless I explicitly configured the <contextXml> param for the com.totsp.gwt:maven-googlewebtoolkit2- plugin Also, even after it was being copied to target/tomcat/conf/gwt/ localhost/ROOT.xml I found that the UI and its back-end servlet were accessible on a URL that did not take the context path specified in context.xml into account (the URL suffix did not start with "/my-ui"). What could I be doing wrong? Thanks. On Aug 27 2008, 6:58 am, Charlie Collins <[email protected]> wrote: > That is already done. > > There are a few caveats though. > > First you can just put a file in src/main/webapp/META-INF/context.xml > that you want to end up as yourcontext.xmland it will work for both > the shell and the war (I believe that still works, be good to check > though - it used to, but I haven't used a custom context for the shell > in a long time). > > Second, GWT-Maven has a "contextXml" configuration param you can use > JUST for the shell. Put a file somewhere in your source, then specify > it with contextXml, and it will become the ROOT.xml. The reason for > this specialness is that GWT embeds Tomcat 5.0.x - not 5.5.x or 6.0.x, > and the configs are different (and because many of us deploy to a > newer version that 5.0.x, you may have to have multiplecontext.xml > files - annoying, but true). > > On Aug 25, 12:12 pm, javapda <[email protected]> wrote: > > > To use a customcontext.xmlin a webapp, I believe, requires the > > author to place it in the following place on the deployed war: > > > + META-INF > > ---context.xml > > > To use this in the gwt:gwt (or gwt:debug) setting you need to run the > > mvn gwt:gwt once to create the tomcat directory structure in your > > project area. > > > Then it is necessary to create a file called ROOT.xml and place this > > in: > > > + target > > ---+ tomcat > > ---+ conf > > ---+ gwt > > ---+ localhost > > --- ROOT.xml > > > Q: Would it make sense to create a new attribute(?) [akin to > > mergewebxml] for the gwt:gwt goal which copies and does some > > modification of acontext.xmllocated elsewhere in your project? > > > Thanks, > > > javapda > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "gwt-maven" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gwt-maven?hl=en -~----------~----~----~----~------~----~------~--~---
