Ah-ha, somehow I changed a line in the uriworkermap.properties file from
this (some pointless experiment out of past frustrated delirium):
/jsp-examples/*=ajp13w
...to this:
/jsp-examples/*.jsp
...so changing it back (which is how it was out-of-the-box after
jk_1.2.8.exe was run) to:
/jsp-examples/*=ajp13w
...fixes it, and I can now access both directories fine (inside and
outside of $CATALINA_HOME/webapps)!!!  YAY!!!

I now get the expected results for:
http://localhost/jsp-examples/ (the webapps/ examples page)
...and for:
http://localhost:8080/jsp-examples/ (the webapps/ examples page)
...and for:
http://localhost:8080 (Tomcat home page)
...and for:
http://localhost (IIS home page)
...and for:
http://localhost/JSP/MYwebapps/MYjsp-examples
(the C:\Inetpub\wwwroot\JSP\MYwebapps\ examples page)
...and the .JSP pages work as expected in both places!
Now I can add docabses to my heart's content - *relieved sigh*

SO...the easy answer is a simple, single CONTEXT addition, but making sure
to overlap the end of the "docbase" path with the "path":
<Context path="/JSP" docbase="C:/Inetpub/wwwroot/JSP" debug="0"
        reloadable="true" crossContext="false" />

As an aside, I got rid of the <...path="" docbase=""...> CONTEXT, so I
have no idea why you're using that line in your server.xml file, Wendy?

THANKS, Wendy!!!
-Matt


On Tue, 22 Feb 2005, Matt wrote:

> OK, we've at least gotten to the point where I can now run the examples
> from my own directory outside of $CATALINA_HOME/webapps, and by ONLY
> editing server.xml and uriworkermap.properties slightly, and NOTHING
> ELSE, which is not only nice, but also what I expected all along!
> (THANK YOU!THANK YOU!THANK YOU!)*
>
> *HOWEVER, now that I made the changes you recommended, the webapps area
> now is NOT FOUND when using plain URL's.  I get a (Tomcat-based) directory
> listing when using the following URL (instead of the Tomcat welcome page):
> http://localhost:8080
> ...which includes my outside folder and then all of the folders in
> $CATALINA_HOME/webapps, AND if I go deeper into any of these listed
> directories with the explicit port :8080 set it works, BUT if I try the
> following URL:
> http://localhost/jsp-examples
> ...then I get a 404 page not found error (not a Tomcat page - standard
> IE stuff).
> With or without the :8080 port in my URL, my outside directory can be
> found just fine:
> http://localhost/JSP/MYwebapps/MYjsp-examples/index.html (and so on)
> ...so I have the inverse problem.
> Good grief!  Can't we have both?
>
> Here's the beginning of my HOST tag through the CONTEXT (everything else
> in server.xml is out-of-the-box, unless jk_1.2.8.exe does anything here as
> well):
>       <Host name="localhost" appBase="webapps"
>        unpackWARs="true" autoDeploy="true"
>        xmlValidation="false" xmlNamespaceAware="false">
>
>        <Context path="" docBase="" debug="0" reloadable="true"
> crossContext="true" />
>
>        <Context path="/JSP" docbase="C:/Inetpub/wwwroot/JSP" debug="0"
> reloadable="true" crossContext="false" />
>
> ...the trick seems to be in the overlapping ending directory in path and
> docbase, which is kinda annoying since EVERY example I found showed path
> set to "" or "/" - hence my frustration up to this point.  I have tried
> removing the first CONTEXT (seems weird with path and docbase both set to
> "").  When I remove that, I get the same results - so what is this CONTEXT
> for, if anything?
>
> My uriworkermap.properties file is as follows:
> # uriworker.properties -
> #
> # This file provides sample mappings for example
> # ajp13w worker defined in workermap.properties.minimal
>
> /servlets-examples/*=ajp13w
> /jsp-examples/*.jsp=ajp13w
> /*.jsp=ajp13w
> /JSP/*.jsp=ajp13w
>
> # Now filter out all .jpeg files inside that context
> # For no mapping the url has to start with exclamation (!)
>
> !/servlets-examples/*.jpeg=ajp13w
>
> So, I'm still trying to get BOTH to work right, but making some progress!
> -Matt
>
>
> On Tue, 22 Feb 2005 [EMAIL PROTECTED] wrote:
>
> > Hi Matt,
> >
> > I'm not sure if this would solve your problem, but I have my server.xml set 
> > up with the following configuration:
> >
> > ------------------------------------------------------------------------------------
> > <Host name="localhost" debug="0" appBase="webapps/myApp"
> >     unpackWARs="false" autoDeploy="true"
> >     xmlValidation="true" xmlNamespaceAware="true">
> >
> >     <Context path="" docBase="" debug="0" reloadable="true" 
> > crossContext="true" />
> >
> >     <!-- context path for external ini directory -->
> >     <Context path="/ini" docBase="c:\\myApp\c\releases\ini" debug="0"
> >              reloadable="true" crossContext="false" />
> >
> >     <!-- context path for external lib directory -->
> >     <Context path="/lib" docBase="c:\\myApp\c\releases\lib" debug="0"
> >              reloadable="true" crossContext="false" />
> >
> > </Host>
> > ------------------------------------------------------------------------------------
> >
> > This means my root webapp for http://localhost resolves to webapps/myApp, 
> > and the http://localhost/ini url goes to c:\\koba\c\releases\ini, etc.
> >
> > When we first set this up Tomcat had problems starting up because it was 
> > reading in old web.xml files under the Tomcat/conf/Catalina... dir(s) but 
> > it couldn't find that path under Tomcat/webapps/myApp/.  So we had to 
> > remove those old xml files (since the localhost root no longer went to 
> > Tomcat/webapps/).
> >
> >
> > As a test, I just tried directing my Host's appBase to an external 
> > directory, and it worked for me.  For that test I configured server.xml per 
> > the following:
> >
> > <Host name="localhost" debug="0" appBase="c:\\myApp\c\releases\ini"
> >       unpackWARs="false" autoDeploy="true"
> >       xmlValidation="true" xmlNamespaceAware="true">
> >
> >       <Context path="" docBase="" debug="0" reloadable="true" 
> > crossContext="true" />
> >
> > </Host>
> >
> >
> > I am running Tomcat 5.0.25.
> > - Wendy
> >
> > p.s. The Apache webserver allows you to manage aliases and the like better, 
> > if you're in a position to install that in front of Tomcat.
> >
> >
> > -----Original Message-----
> > From: Matt [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 22, 2005 11:40 AM
> > To: Tomcat Users List
> > Subject: Re: Tomcat 5.5 working, BUT not outside of webapps/
> >
> >
> > Well, I've tried all sorts of configurations, so I was hoping to get a
> > clean example from someone who had it working.  I changed the stock Tomcat
> > 5.5 server.xml file to add the following (within the pre-existing, as well
> > as the only, HOST tag for localhost, and I have tried with/without a slash
> > for path, and with forward or backward slashes in docbase):
> > <CONTEXT path="" docbase="C:/Inetpub/wwwroot/MYwebapps" debug="0"
> > reloadable="true" />
> > ...and I have edited the stock Tomcat 5.5 uriworkermap.properties file to
> > add the directory relative to the additional docbase (I've also tried
> > without the .jsp specificity at the end of the line to handle everything):
> > /MYjsp-examples/*.jsp
> > (the jk_1.2.8.exe installer puts it all in its own folders in
> > $CATALINA_HOME's parent, not within $CATALINA_HOME/bin, and also sets the
> > registry properly - anything else this nice installer does for me?  It
> > doesn't appear to set environment variables $CATALINA_HOME or JAVA_HOME -
> > do I need to do this manually?  The webapps examples work fine without
> > these variables set though, so is this a deprecated step?)
> >
> > So, if I have copied the webapps folder (and everything in it) to the
> > C:\Inetpub\wwwroot folder and renamed it MYwebapps, and renamed
> > jsp-examples therein to be MYjsp-examples (and fixed the .html to point to
> > the right path), I would have thought that I could run examples from the
> > new directory as well.  I don't see any path info. (non-relative)
> > elsewhere that would cause problems and need to be changed?  However, if
> > uriworkermap.properties is edited properly, I get a Tomcat 404 error
> > starting with the docbase, when clicking any example (.jsp link; the .html
> > ones still work fine, since they're not handed-off to Tomcat) from the
> > main page:
> > http://localhost/MYwebapps/MYjsp-examples/index.html
> > ...the same files still work fine if I go back to the original location:
> > http://localhost/jsp-examples
> >
> > I've even tried making new HOST tags as well, but Tomcat won't start if
> > you try to define two HOST tags for the same "system" whether I use a
> > machine name, IP or whatever.
> >
> > Perhaps I misread the docs somewhere, or there's more to it than the above
> > two steps, I'd love to know!
> >
> > Thanks,
> > -Matt
> >
> >
> > On Tue, 22 Feb 2005, Michael Greer wrote:
> >
> > > Why don't you show us your config file. This behavior work fine for me
> > > with 5.5.7, with Apache & mod_jk.
> > >
> > > On Feb 22, 2005, at 1:20 AM, Matt wrote:
> > >
> > > > Is this simply not possible?  I have tried extrapolating form the docs
> > > > (which seems to work fine under webapps/ or $CATALINA_HOME) but
> > > > anything
> > > > outside of it fails as badly as the other works perfectly, even if I
> > > > try
> > > > to swap-out webapps/ for an otuside docbase using the <HOST> tag
> > > > already
> > > > present.
> > > >
> > > > There's got to be a file or simple edit that I'm missing for this?
> > > > Anyone?
> > > >
> > > > Thanks,
> > > > -Matt
> > > >
> > > >
> > > > On Sun, 20 Feb 2005, Matt wrote:
> > > >
> > > >> OK, the docs out there are good, but they either concern old versions
> > > >> of
> > > >> IIS and/or Tomcat -OR- they concern the JK2 module (including this
> > > >> list's
> > > >> archives I have searched).
> > > >> If JK2 is NO LONGER SUPPORTED, why in the heck would I care to use it?
> > > >> So, I am using the very nice jk_1.2.8.exe installer.  With that, most
> > > >> of
> > > >> the "steps" found in the various, partially-helpful docs are already
> > > >> done!
> > > >> ;^)
> > > >>
> > > >> That said:
> > > >> I am using Win2K + IIS5, and also Win2K3 + IIS6, and in either case,
> > > >> also
> > > >> Tomcat 5.5:
> > > >> I can go to http://localhost and get my IIS index page.
> > > >> I can go to http://localhost:8080 and get my Tomcat index page.
> > > >> I can go to http://localhost/jsp-examples/index.html and run all the
> > > >> wonderful examples.
> > > >> HOWEVER, if I simply want to -ALSO- hand-off jsp pages to Tomcat that
> > > >> are
> > > >> in C:\Inetpub\wwwroot (and below) everything goes to hell.
> > > >>
> > > >> I have tried adding CONTEXT tags to server.xml until I turn blue in
> > > >> the
> > > >> face, and when I do so I get either 404 not found errors from Tomcat
> > > >> (can't find the subdirectory b/c I assume it is looking for it in
> > > >> webapps/, but then again it can't find it even if I copy the whole
> > > >> thing
> > > >> into webapps/) or "The specified module could not be found" message
> > > >> on the
> > > >> page (IIS result of a uriworkermap.properties issue).
> > > >> I have even tried editing the existing HOST tag to change "webapps"
> > > >> to "C:/Inetpub/wwwroot" and all sorts of folders below wwwroot.  In
> > > >> those
> > > >> cases, if I manage to edit the uriworkermap.properties file
> > > >> correctly, all
> > > >> I get is a blank page for any .jsp, while IIS still handles the other
> > > >> stuff just fine.
> > > >>
> > > >> So, instead of these outdated docs everyone keeps pointing to, does
> > > >> anyone
> > > >> have any simple instructions to get Tomcat to properly use a folder
> > > >> OUTSIDE of webapps, and ALONG WITH webapps to work (especially
> > > >> assuming
> > > >> you've already got the basics working just fine as I do)?
> > > >> I'd like to start by getting a copy of jsp-examples working in
> > > >> wwwroot/ if
> > > >> possible (which is also how I was testing in the situation above, if
> > > >> that
> > > >> means anything), rather than also confusing the situation by learning
> > > >> how to create apps myself at the same time.  Perhaps that has caused
> > > >> my
> > > >> problem - maybe the issue lies in a web.xml file somewhere for the
> > > >> jsp-examples (I;ve even copied all of webapps to wwwroot to try and
> > > >> get
> > > >> that to work, but no luck).
> > > >>
> > > >> Thanks,
> > > >> Matthew Kozak
> > > >> Rutgers University-Camden
> > > >> [EMAIL PROTECTED]
> > > >>
> > > >> **********************************************************************
> > > >> ****
> > > >>  "They that can give up essential liberty to obtain a little temporary
> > > >>        safety deserve neither liberty nor safety."  -Ben Franklin
> > > >> **********************************************************************
> > > >> ****
> > > >>
> > > >
> > > >
> > > > Matthew Kozak
> > > > Rutgers University-Camden
> > > > [EMAIL PROTECTED]
> > > >
> > > > ***********************************************************************
> > > > ***
> > > >  "They that can give up essential liberty to obtain a little temporary
> > > >         safety deserve neither liberty nor safety."  -Ben Franklin
> > > > ***********************************************************************
> > > > ***
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > Matthew Kozak
> > Rutgers University-Camden
> > [EMAIL PROTECTED]
> >
> > **************************************************************************
> >  "They that can give up essential liberty to obtain a little temporary
> >     safety deserve neither liberty nor safety."  -Ben Franklin
> > **************************************************************************
> >
> > Visit our website at http://www.ubs.com
> >
> > This message contains confidential information and is intended only
> > for the individual named.  If you are not the named addressee you
> > should not disseminate, distribute or copy this e-mail.  Please
> > notify the sender immediately by e-mail if you have received this
> > e-mail by mistake and delete this e-mail from your system.
> >
> > E-mail transmission cannot be guaranteed to be secure or error-free
> > as information could be intercepted, corrupted, lost, destroyed,
> > arrive late or incomplete, or contain viruses.  The sender therefore
> > does not accept liability for any errors or omissions in the contents
> > of this message which arise as a result of e-mail transmission.  If
> > verification is required please request a hard-copy version.  This
> > message is provided for informational purposes and should not be
> > construed as a solicitation or offer to buy or sell any securities or
> > related financial instruments.
> >
> >
>
>
> Matthew Kozak
> Rutgers University-Camden
> [EMAIL PROTECTED]
>
> **************************************************************************
>  "They that can give up essential liberty to obtain a little temporary
>       safety deserve neither liberty nor safety."  -Ben Franklin
> **************************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Matthew Kozak
Rutgers University-Camden
[EMAIL PROTECTED]

**************************************************************************
 "They that can give up essential liberty to obtain a little temporary
        safety deserve neither liberty nor safety."  -Ben Franklin
**************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to