You can't use the contextXml to change the context path in the shell. Once
it is in conf/gwt/localhost/* that is the name. The way tomcat starts up, if
there is a META-INF/context.xml it copies it to the path, or default path to
conf/[server name]/[address]/[path].xml . At the point the the file is in
the conf/* structure, you are already too late to change the context path.
You are also right, it doesn't get copied unless you specifically declare
it. This is mostly because GWT is based on Tomcat 5, which few people useand
usually you will have a "gwtshellcontext.xml" file just for the shell and a
"real" context.xml in webapp/META-INF.

On Tue, Mar 24, 2009 at 11:39 AM, Farrukh Najmi <[email protected]>wrote:

>
>
> 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
> >
> >
>
> >
>


-- 
:Robert "kebernet" Cooper
::[email protected]
Alice's cleartext
Charlie is the attacker
Bob signs and encrypts
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to