Chris, I really don't want double deployment.  I'm trying to have a single
abc.war and avoid having to install apache to redirect/rewrite
http://host:8082/xyz to http://host:8082/abc.  I was hoping there was a way
to have tomcat send /xyz to abc.war.  I suppose I could also just copy
abc.war to xyz.war and have both in the webapps directory, but I'm trying
to avoid that.

On Fri, Dec 9, 2016 at 8:23 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Victor,
>
> On 12/9/16 11:17 AM, Victor Rodriguez wrote:
> > Chris, a little more progress this morning...
> >
> > This is what I currently have in my xyz.xml
> >
> > <Context override="true" swallowOutput="true"
> > docBase="wfsservice.war">
> >
> > And, this is what I get in my catalina.out...
> >
> > INFO: Deploying configuration descriptor
> > /dg/local/cots/tomcat/tomcat_8082/conf/Catalina/localhost/xyz.xml
> >
> > ...then...
> >
> > WARNING: A docBase
> > /dg/local/cots/tomcat/tomcat_8082/webapps/abc.war inside the host
> > appBase has been specified, and will be ignored
>
> Aah, yes. This is probably because specifying a docBase inside the
> appBase usually indicates a mistake that will result in
> double-deployment of a web application. But double-deployment is
> precicely what you are requesting.
>
> We'll need to do this then:
>
> 1. Put abc.war somewhere else
> 2. Change the path in xyz.xml to match #1
> 3. Copy xyz.xml to abc.xml in the same directory
> 4. Profit
>
> > ...then...
> >
> > SEVERE: Error starting static Resources
> >
> > java.lang.IllegalArgumentException: Document base
> > /dg/local/cots/tomcat/tomcat_8082/webapps/xyz does not exist or is
> > not a readable directory
> >
> > So, it looks like it's looking for an exploded xyz directory.
>
> It might be. But there isn't a stack trace so I have no idea if that
> is even being produced by Tomcat.
>
> - -chris
>
> > On Fri, Dec 9, 2016 at 8:07 AM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Victor,
> >
> > On 12/8/16 7:57 PM, Victor Rodriguez wrote:
> >>>> On Thu, Dec 8, 2016 at 2:50 PM, Christopher Schultz <
> >>>> ch...@christopherschultz.net> wrote:
> >>>>
> >>>>> Victor,
> >>>>>
> >>>>> On 12/8/16 4:59 PM, Victor Rodriguez wrote:
> >>>>>>>> THANKS IN ADVANCE FOR YOUR HELP!  (not yelling, just
> >>>>>>>> emphasizing!)
> >>>>>>>>
> >>>>>>>> I have abc.war and I want both /abc and /xyz to work
> >>>>>>>> for it.  I've tried adding
> >>>>>>>> aliases="/abc=abc.war,/xyz=abc.war" and
> >>>>>>>> aliases="/abc=abc,/xyz=abc" but neither of those
> >>>>>>>> worked.  This is how my original context.xml looked
> >>>>>>>> like.
> >>>>>>>>
> >>>>>>>> <Context override="true" swallowOutput="true"> <!--
> >>>>>>>> Doing swallowOutput=true to allow each web
> >>>>>>>> applications System.out and System.err calls to end
> >>>>>>>> up in a separate log, not in catalina.out. See Jira
> >>>>>>>> CA-4589 --> <!-- Default set of monitored resources
> >>>>>>>> -->
> >>>>>>>> <WatchedResource>WEB-INF/web.xml</WatchedResource>
> >>>>>>>> <!-- Disable session persistence across Tomcat
> >>>>>>>> restarts by including this line; no sessions used for
> >>>>>>>> many OGC implemenations--> <Manager pathname="" />
> >>>>>>>>
> >>>>>>>> <!-- Uncomment this to enable Comet connection
> >>>>>>>> tacking (provides events on session expiration as
> >>>>>>>> well as webapp lifecycle) --> <!-- <Valve
> >>>>>>>> className="org.apache.catalina.valves.CometConnectionManagerVal
> ve"
> >>>>>>>>
> >>>>>>>>
> >
> >>>>>>>>
> /> -->
> >>>>>>>>
> >>>>>>>> </Context>
> >>>>>>>>
> >>>>>
> >>>>> Tomcat 7 aliases are intended to map URLs within a single
> >>>>> web application. You can't use it to duplicate the web
> >>>>> application on two base paths.
> >>>>>
> >>>>> Here's what you need to do:
> >>>>>
> >>>>> 1. Put your WAR file in webapps/abc.war. This will deploy
> >>>>> as usual.
> >>>>>
> >>>>> 2. Copy webapps/abc.war/META-INF/context.xml into
> >>>>> conf/Catalina/localhost/xyz.xml and modify the <Context>
> >>>>> element like this:
> >>>>>
> >>>>> <Context override="true" swallowOutput="true"
> >>>>> docBase="webapps/abc.war "> ... </Context>
> >>>>
> >>>> Thanks Chris!  I now get "Document base
> >>>> /dg/local/cots/tomcat/tomcat_8082/webapps/xyz does not exist
> >>>> or is not a readable directory"
> >
> > Is that path correct? What is the stack trace of that error?
> >
> > I would have expected the path to be pointing to abc.war, not
> > .../xyz
> >
> > -chris
> >>
> >> ---------------------------------------------------------------------
> >>
> >>
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYStqTAAoJEBzwKT+lPKRYHakP/1ElYsYhiwGr/WUS8LvYxGwY
> OtTGFKWwuUetcXhPNHnXmH3cnJcME44bjQyLDqXCKgKiCHaJ6aV+p+F/vlaFL5no
> T6vu1lk5BUA/uMgryyg766EWoDeQZTlp/SKYpPwJfrdmYr36pqkOC93aoZIBB1QF
> /vWOByQIhVFvWM7e/7GxJo5tG0StGWLaM16zj88r+lhkV37UweavovStjNIjIWrC
> W7ihnlHV5QeW1rKFQ+rmD7BVRY0up5P8Be8FUrNrIFheXq7+JQBNRtM2YRIcSwTM
> TzbUr+n8MOAzIths6HZ9vnddXSE61Ndqku8FPZ/CMSYkPCIgK+x8btQ/4lb2zqDK
> aUQac0lOeQQMK9POXpp65O+45yVQkyJeTScgAjikngRdn0x9VQTxHa4WggSgFPxX
> vZik/3s5QvzjlGlArk7+71r/mmszOc+g2s+vN7aBDTDiGgHJOtStp1SbmkgW9w7m
> sW+dSgR/78BRFZSXRsRdBf3RkQzCFk/dAJr8flEYKWFF7s0TOmrMSuxX7NB3EzK+
> 9tcce1xSb1TXRq/h/x59Mjidntl5qo7g123QWgwe4z7tqfOMbj30zYDwWjIJTzDt
> hq5zM1qxgH/mAUtiwdK/Ezb7CcOPMj5VokGu7ptKB9PrxqtLLZ9EbfrbB2sicbZ4
> gAXhoj65+cdeL322fnMj
> =yBjR
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Sent from neither my iPhone nor my iPad.

Reply via email to